Sun Java System Portal Server 7.1 Developer's Guide

Event Handling Life Cycle

The event cycle starts with the response to user interaction from the inside processAction method. These are Generation 1 events. These events are placed in the event queue by the Portlet Container and dispatched in the order they are created. The dispatching of the events continue, until all the events in the event queue are dispatched to appropriate portlets.

Dispatching of the events amount to calling the handleEvent methods of the appropriate portlets. Portlets can generate events in the handleEvent method which are Generation next events. If a portlet has subscribed to events which are generated in different generations, it will receive the events in proper order. It means that the handleEvent will be called with Generation ith event first and upon completion of that method, handleEvent will be called with event from Generation i+1.