Creating Actions
You need actions to implement an event handler. An action is a special method for handling events. To assign an action to a UI element, you must create the action in the SAP NetWeaver Developer Studio, bind it to the UI element, and manually implement the event handler in the controller for the corresponding view.
If you enter any invalid data, this inhibits the execution of the event handler and leads to an error message being displayed for the user. After correcting the invalid data, the user can press the button again. The Web Dynpro runtime framework automates this behavior (generic validation service). If the end user enters invalid data, execution of the event handler is blocked.
A non-validating action is always executed, regardless of whether or not the end user entered invalid data. The event handler must be prepared to deal with invalid data. It is advisable to reinitialize invalid context attributes as soon as they are no longer required. Otherwise, any subsequent validating actions could be prevented by old validation errors.
Non-validating actions are used when the user quits an application, as the user would otherwise remain in the application if the entries are invalid. You can also use it to reset the entries in all fields of a view at runtime.
...
1. Select the UI element in the Outline view and select the event in the Properties view.
2.
To start the
New Action wizard, select
the
button.

You can also
start the New
Action wizard in the
Action tab by choosing New
below the Action
table. You then need to
assign the action to the event later on by choosing
in the
Properties view of the relevant UI element.
The Web Dynpro generator automatically creates the event handler. If you assigned the name Save to the action, the corresponding event handler is onActionSave.
You have defined an action and the corresponding event handler.
public void onActionSave(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent) |