You can fire an event at any time in your Web Dynpro application, and you can fire many events in one request-response cycle. The event is sent with the next response to the client.
Normally, you fire client events in a Web Dynpro action event handler, for example, for handling a button click, though you can fire the event anytime during the request cycle.
Use the WDPortalEventing.fire() method to fire an event, as shown in the following example:
Syntax
WDPortalEventing.fire ("urn:com.sap.tc.webdynpro.test.portal", "TestEvent", "AParameter");
The fire() method takes the following string parameters:
Namespace of the event
Name of the event
An additional string parameter that is passed to the iViews that subscribe to the event
An application that subscribes to the event can retrieve the parameter values in the Web Dynpro action that is triggered by the event by defining parameters for the action. For more information, see Subscribing to a Client Event.