PORTLET LIFECYCLE AND PORTLET CONTAINER

Relationship between the Servlet Container and the Portlet Container:

The portlet container is an extension of the servlet container. As such, a portlet container can be built on top of an existing servlet container or it may implement all the
Functionality of  a servlet container. Regardless of how a portlet container is implemented, its runtime environment is assumed to support Servlet Specification 2.3.

Elements of a Portal Page:
A portlet window consists of:
  • Title bar, with the title of the portlet
  • Decorations, including buttons to change the window state of the portlet (such as maximize or minimize the portlet) and buttons to change the mode of a portlet (such as show help or edit the predefined portlet settings)
  • Content produced by the portlet (also called a markup fragment).
The portlet container instantiates portlets manages their lifecycle and invoking them to process requests. The lifecycle consists of:
  • Initializing the portlet using using the init method.
  • Request processing.
  • Taking the portlet out of service using the destroy method .
The portlet receives requests based on the user interaction with the portlet or portal page. The request processing is divided into two phases:
  1. 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.
  1. 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.

1 comments:

Search This Blog

All the rights are reserved to this blog is belongs to me only.. Powered by Blogger.