Portlet Factory, Version 6.1.2


 

Overview: handling events

Your model can use events to trap and process different types of events. Your model can process the following types of events:

When firing an event, your model can send data and can broadcast that a particular action has occurred.

 

System events

All models support the following predefined system events:

System: OnWebAppLoad

Fired each time a new instance of the model WebApp is instantiated for a session.

System: OnRequest

Fired each time an external request is made (typically, from a browser) to the WebApp.

System: OnUnhandledError

Fired when an error occurs and is not handled by an explicit error handler.

Page:pageName:OnPageLoad

Fired each time the specified page is requested. Each page in the model gets its own OnPageLoad event declaration.

To process any of these events, add an Event Handler builder to the model and specify the action to perform when the event occurs.

 

User events

As the user interacts with the HTML controls of your application, you can process those events with the HTML Event Action builder. This builder monitors a specified HTML control (added to the page by another builder) and performs an action when the specified event occurs. For example, to submit a form when the user clicks on a link, use the HTML Event Action builder call.

 

Declared events

You can declare application-specific events by adding an Event Declaration builder to a model. The Event Declaration builder adds a fireEventName method to the model that allows you to fire the event. Any models that have an identical Event Declaration builder call (either added directly or indirectly with an imported model) can handle that event.

 

Widget events

A Widget event is a special event that is handled by widgets in IBM® Lotus® Mashups. Create widget events using the Widget Event builder.

Parent topic: Developing Web applications


Library | Support |