Show TOC Start of Content Area

Background documentation Portlet Life Cycle  Locate the document in its SAP Library structure

The portlet container contains portlets, provides them with the required runtime environment, and manages their life cycle. It also provides persistent storage for portlet preferences.

This graphic is explained in the accompanying text

Portlet Life Cycle

Portlet Life Cycle Phases

The portlet life cycle comprises three phases:

      Initialization phase

The portlet container loads, instantiates, and initializes the portlet application. The portlet container calls the init() method and places the portlet into service.

·        Request handling phase

The portlet container processes requests from the portal to portlets hosted by the portal as follows:

       Action requests

The portlet container locates the portlet, initializes the environment, and invokes the processAction() method to perform actions targeted to the portlet.

¡        Render requests

The portlet container locates the portlet, initializes the environment, and invokes the render() method to perform the render operation.

      End of service phase

The portlet container calls the destroy() method on a portlet to allow it to clean up any resources that it holds before destroying the portlet object. The portlet is removed from service.

Portlet Request Sequence

Users access the portal by using a client, that is, a Web browser. Requests are processed as follows:

·        The portal receives request from client.

·        The portal determines if it is an action URL or a render URL and a list of portlets that need to be executed in order to satisfy the request.

·        If the request contains an action URL, the portal triggers and action request to the portlet container.

·        If the request contains a render URL, the portal triggers a render request.

·        The portlet container locates portlets, initializes the environment and invokes portlets.

·        Portlets generate markup fragments.

·        The portlet container sends fragments to the portal.

·        The portal adds decorations and controls to the fragment to form a portlet window.

·        The portal aggregates portlet windows to form a complete portal page.

·        The portal page is returned to the client.

 

See also:

Developing Portlets

 

End of Content Area