Enabling cooperative targets without a Faces action

In addition to specifying a Faces action by selecting a command-control component in the Enable Cooperative Target dialog, you can also enable a Faces portlet as a cooperative target without 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 Page > Cooperative > Enable Target from the toolbar.
  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 field.
    2. Specify a request parameter name in the Parameter field.
    3. 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

(C) Copyright IBM Corporation 2002, 2005. All Rights Reserved.