2.11 Action event handling

 <  Day Day Up  >  

The event model in WebSphere Portal is very similar to the traditional Java event model. When a portlet wishes to be notified that a user has performed an action, it simply implements the ActionListener correctly and the portal server will take care of calling the appropriate method when the event is generated. Unlike in the traditional Java event model, only the portlet generating the event may listen for that event. That is, there will always only be a single listener for any particular ActionEvent. In order to notify other portlets of an event, the listening portlet may choose to send messages. For more information on sending messages, see 2.13, "Portlet messaging" on page 102.

When the Portal server services a request, it acts in two distinct phases. The first phase is the event processing phase. All events, including WindowEvents, ActionEvents and MessageEvents are generated, delivered and processed in this phase. Once this phase is complete, the content generation phase begins. Once content generation has begun, no events can be generated. Attempting to generate events during the content generation phase, for example doView, doEdit, etc., will cause an exception.

 <  Day Day Up  >  


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net