Adding Support for Additional Portlet Modes

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:
  1. Create a new web page to represent the initial content of the mode as described in the section Creating a web page.
  2. Right click on the portlet.xml file and select Open With > JSR 168 Portlet Deployment Descriptor Editor.
  3. Select the Portlets tab at the bottom of the editor.
  4. In the Portlets list, select the portlet to which you will be adding the mode.
  5. Find the Supported Modes section. Select text/html and click the Edit.
  6. 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
  7. Click OK.
  8. 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
  9. Click OK.

Feedback