Adding and updating Faces portlet modes for existing IBM® portlets

To add Faces portlet modes and their initial pages, or change an initial page value, edit configuration parameters using the Portlet Deployment Descriptor editor.

  1. 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.

  2. Expand the

    Concrete Portlet Application container, and select the portlet inside it.

  3. 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.

  4. 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.edit_defaults An initial JSP file path for the EditDefaults 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

  5. Then, open the

    Portlet Application container, and select the portlet inside it.

  6. Locate the new mode in the

    Markups table (HTML is the only available markup currently supported), and change the value from

    None to

    Fragment.

  7. 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>

 

Related concepts

JavaServer Faces portlet applications

Markup languages

Creating Faces portlets and projects

 

Related tasks

Creating portlet JSP files

Adding and updating Faces portlet modes

Inserting images in portlet JSP files

Changing portlet modes using a Faces action

Changing a JSF portlet page without a JSF action

Accessing portlet API objects from Faces actions and components