- Portlet Concepts
- Portlet Classes
- Portlet TagLib
- Portlet DTD
- Hello World
- Portlet with Action
- More examples
- Mailing Lists
- Source Repository
- Issue Tracking
- Project Team
- Road Map
- Basic Portlet
- RSS Feed
- Google Search
- Discussion Forum
- Email Client
- Document Manager
- Setup jPortlet Project
- Server Side Include
- Portlet Actions
- Changing Look & Feel
This section presents all the concepts around Portlets:
Portlet life cycle
Each portlet in jPortlet exhibits the following portlet life cycle:
In order to service users, each portlet is combine with a user session. When the user logs into the
When the Portal initializes, it initialized each Portlet by calling their
Like Servlets, the only one instance of the Portlet is initianticiate and shared by all the users.
The portal calls the
service() method when the portlet is required to render it's content.
During the life cycle of the portlet the
service() method is typically called many times.
When the portal is terminating, portlets are taken out of service,
then destroyed with the
Finally the portlet is garbage collected and finalized
login() is called for each portlet, which allow each portlet to initialize
the user portlet.
The portlet call the
logout() method of each portlet to inform the the user's session is
Portlet modes allow to display different user interfaces, depending of the task required.
In jPortlet, there are 4 diplay modes which can be invoked by icons on the portlet title bar.
The following modes are supported by the Portlet API:
The Portlet API provides methods for the portlet to determine the current or previous mode.
All portlets must support the VIEW mode
- This is the portlet's normal mode of operation.
If this mode is supported by a portlet, the portlet provides a help page for users
to obtain more information about the portlet.
If this mode is supported by a portlet, the portlet provides a page for users to customize
the portlet for their own needs.
For example, a portlet can provide a page for users to specify their location for obtaining
local weather and events. Users must be logged into the portal to access edit mode.
If this mode is supported by a portlet, the portlet provides a page for portal administrators
to configure a portlet for a user or group of users
Portlet states allow to change how the portlet window is displayed within the portal.
The following states are supported by the Portlet API:
The Portlet API provides methods for the portlet to determine the current state.
- The is when the portlet is arranged with other portlets
When a portlet is maximized, it is displayed in the entire body of the portal,
replacing the view of other portlets.
By default, jPortlet always display the modes
jPortlet supports 2 type of events:
- Action events
When a user click a
SUBMIT button in the HTML view
of the portlet, this click is transformed to an
that is generated and received by the Portlet's
- Message events
These event are generated when a portlet send a message to
another portlet. Its a basic structure for inter-portlet communication.
are received by the target Portlet's