Enabling cooperative targets without a Faces action

When a cooperative target is a Faces portlet, the target page is not required to contain a Faces action. This is a design choice. If the target Faces page expects only one type of input value, it is not necessary to associate it with a Faces action.

To enable a cooperative target in this way, follow these steps:

  1. In the Project Explorer view, select a portlet or the Portlet Deployment Descriptor. Portlets are displayed when you expand the Portlet Deployment Descriptor node under the portlet project folder.
  2. Right-click the desired portlet, and select Cooperative > Enable Target from the pop-up menu. The Enable Cooperative Target dialog box appears. Alternatively, open a JSP file, ensure that it has focus, and select the Page > Cooperative > Enable Target menu choice.
  3. Provide any appropriate values in the Enable Cooperative Target dialog box, as described in Enabling cooperative targets. However, you should supply the following values:
    1. Specify a JSP file in the [Action] Name field.
    2. Specify a request parameter name in the [Parameter] Parameter field.
    3. Select Request parameter from the Bound to drop-down list.
    4. Click OK. The Click-to-Action-enabled portlet is shown with a target portlet icon (Click-to-Action Target Portlet icon) in the Project Explorer view.
  4. Use the request parameter to initialize or update data to be displayed in the JSP file. Edit the page code associated with the JSP file.
    For example:
    public TicketList getTicketList() {
       if (ticketList == null) {
          ticketList = (TicketList)
             getFacesContext().getApplication().createValueBinding("#{ticketList}").getValue(getFacesContext());
          String customerId = (String)getRequestParam().get("customerId");
          if (customerId != null) {
             ticketList.setCustomerId(customerId);
          }
       }
       return ticketList;
    }
Related concepts
Developing cooperative portlets
Related tasks
Enabling existing portlets for cooperation
Enabling cooperative sources
Enabling cooperative targets
Inserting Click-to-Action encodeProperty
Inserting Click-to-Action encodeProperties
Editing Click-to-Action encodeProperty
Editing Click-to-Action encodeProperties
Related reference
Web Services Description Language (WSDL) 1.1
WebSphere Portal Information Center
XML Schema Part 2: Datatypes
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.