Typically, you define portlet modes when the New EGL Portlet Project
or New EGL Portlet wizards; however, you can still add modes after
the portlet has been created.
To add portlet modes to an existing portlet:
- Create a new web page to represent the initial content of the
mode as described in the section Creating a web page.
- Right click on the portlet.xml file and select .
- Select the Portlets tab at the bottom of
the editor.
- In the Portlets list, select the portlet
to which you will be adding the mode.
- Find the Supported Modes section. Select text/html and
click the Edit.
- Under Portlet modes, click Add.
The cursor will become active in the Portlet modes list.
Type the name of the mode ytaht you want to add. Valid values for WebSphere® Portal Server 6.0
are:
- view
- edit
- help
- config
- edit_defaults
- Click OK.
- Find the Initialization section. This section
contains initialization parameters that are read when the portlet
is loaded by the portlet container. EGL based JSF portlets use initialization
parameters to specify which JSP file to display as the initial content
for each supported portlet mode. Click Add.
In
the
Value field, enter the path to the JSP
to be used for this mode. This value should be relative to the context
root of the web application. In the
Name field,
you will enter a predefined parameter name indicating the mode this
JSP will support. Valid values are:
- com.ibm.faces.portlet.page.view
- com.ibm.faces.portlet.page.edit
- com.ibm.faces.portlet.page.config
- com.ibm.faces.portlet.page.help
- Click OK.