To add Faces portlet modes and their initial pages, or change an
initial page value, you must edit configuration parameters using the Portlet
Deployment Descriptor editor.
- Open the portlet.xml file (double-click the Portlet Deployment
Descriptor node in the Project Explorer) in the Faces portlet project to which
you want to add new modes.
- Expand the Concrete Portlet Application container,
and select the portlet inside it.
- In the Setting Parameters section, click
the Add button to add a new entry row. If you merely
want to change the JSP path for the initial page, select the path for the
applicable mode and overtype the path with a new value.
- Overtype the appropriate mode and JSP path (relative to the project
context root) for the initial page into the newly created cells.
Mode |
JSP path |
com.ibm.faces.portlet.page.view |
An initial JSP file path for the View mode |
com.ibm.faces.portlet.page.edit |
An initial JSP file path for the Edit mode |
com.ibm.faces.portlet.page.help |
An initial JSP file path for the Help mode |
com.ibm.faces.portlet.page.config |
An initial JSP file path for the Configure mode |
- Then, open the Portlet Application container,
and select the portlet inside it.
- Locate the new mode in the Markups table
(HTML is the only available markup currently supported),
and change the value from None to Fragment.
- Save the portal.xml file.
If you select the
Source page and scroll to
the place in the portal.xml file where configuration parameters are defined,
you should see generated results similar to the following example:
<config-param>
<param-name>com.ibm.faces.portlet.page.edit</param-name>
<param-value>/jsp/MyEdit.jsp</param-value>
</config-param>