Action

About this task

In most case, when an user selects a widget or changes the value of a widget, some operation needs to be executed. XML UI Engine provides the action injection for this purpose.

Users need to implement the IAction interface provided by XML UI to execute the operation on demand.

The actions provided by XML UI Engine are listed below. See the IAction.java interface for more details.

Injection the action in configuration file

The definition of action in XML UI configuration file is based on the injection of Element factory. The injection name is “actions”. Note that more than one action could be assigned to a widget, they will be processed one by one. So the action should be defined in a list.
<Text bounds="182,77,280,22">
	<list Injection="initializers">
		<com.ibm.btt.xmluiengine.test.initializers.TextInitializer />
	</list>

	<com.ibm.btt.rcp.xui.format.NumericFormat	Injection="format" />

	<list Injection="actions">
		<com.ibm.btt.rcp.xui.action.TestAction />
	</list>
</Text>

The XLM UI Engine will trigger the Actions for the widget marked with v..