Show TOC Start of Content Area

Procedure documentation Handling Events  Locate the document in its SAP Library structure

To enable a Web Dynpro application to react to user actions or to events raised by the system, certain UI elements have specific events. The Button has an event onAction,  for example. If you define an action assigned to an event, an event handler is generated, too. You can reuse one action in several events and you can assign various actions to one event handler.

This graphic is explained in the accompanying text

In a Web Dynpro application, the interaction results in a request being sent to the server by the browser. The Web Dynpro Framework analyses the event and calls either the event handler or, if you have enabled validation in the corresponding action, the generic validation service. In the latter case, the event handler is only called if all data is valid.

Procedure

...

       1.      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, assign it to the UI element event, and manually implement the event handler in the controller for the corresponding view.

More information: Creating Actions

       2.      You can pass parameters from an event to the event handler. These event parameters parameter have to be mapped to parameters of the event handler using IWDParameterMapping.

More Information: Mapping Event Parameters to Action Parameters

       3.      Optional: There is a common event parameter nodeElement that you can use if you need to retrieve information from the context the UI element is bound to.

More Information: Mapping the Generic Event Parameter nodeElement

 

End of Content Area