Online documentation - Websydian v6.5 |
Introduction Implementing Other Uses
Event Handler functions used in Enterprise WAP applications are the same as Event Handler functions in HTML applications, where inheritance in WAP development is specified from the WapEventHandler pattern based on the Websydian EventHandler pattern. A WAP Event Handler function must be defined for each user event in a WML Card, and each defined Event Handler will - in the generated Deck Template - result in an action implementing a WML go action. A Websydian Enterprise WAP application typically contains many WAP Event Handler functions.
The WAP Event Handler function is called through the WAP Dispatcher function when the user triggers an Event Handler action in the WML Card.
When a user selects an Event Handler action in a WML Card a call to the WAP Dispatcher function will be triggered, which in turn routes the call to the appropriate WAP Event Handler function. The Event Handler function then receives and validates the input parameters (if any) from the calling WML Card.
Specification of WAP Event Handler functions involves determining the input parameter fields received by the Event Handler function. These fields will either be hidden or appear as user input fields in the WML Card. Specification of WAP Event Handlers also involves specifying any database update functionality that might be associated with the actions.
An Event Handler function in a WAP application must always produce a valid WML page as response to the WAP user. It does so by calling a Deck Generator function, which produces a WML Deck as a response to the WAP request. Therefore, it must always be specified which Deck Generator function should be called as response to the event.
WAP Event Handler functions are different from Jump functions which just transfer control to another Card in the Deck without accessing the HTTP server.
See the Using the Diagram Editor in WAP Development section of the Other Uses of the Deck Generator page. See also the Post or Get as Submit Method for Details Event Handlers section of the Other Uses of the Deck Template Generator page.