Life Cycle of JSR 168 Portlets


Every portlet has it's own life cycle. The basic portlet life cycle is to:
  • Initialize, using the init class to initialize the portlet and put it into service.
  • Handle requests, processing different kinds of actions and rendering content.
  • Complete, using the destroy class to take the portlet out of service.
The portlet receives requests based on the user interaction with the portlet or portal page. The request processing is divided into two phases:

Action processing

If a user clicks on a link on the portlet, an action is triggered. The action processing must be finished before any rendering of the portlets on the page is started. In the action phase the portlet can change the state of the portlet.

Rendering content

In the render phase, the portlet produces its markup to be sent back to the client. Rendering should not change any state. It allows a page re-fresh without modifying the portlet state. Rendering of all portlets on a page can be performed in parallel.

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club