In order to receive events the portlet must implement the
EventPortletinterface in the
javax.portletpackage. The portlet container will call the
processEventmethod for each event targeted to the portlet with an
EventResponseobject. Events are targeted by the portal / portlet container to a specific portlet window in the current client request.
Events are a life cycle operation that occurs before the rendering phase. The portlet may issue events via the
setEventmethod during the action processing which will be processed by the portlet container after the action processing has finished. As a result of issuing an event the portlet may optionally receive events from other portlets or container events. A portlet that is not target of a user action may optionally receive container events, e.g. a portlet mode changed event, or events from other portlets, e.g. an item was added to the shopping cart event.