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 this Portlet to Receive Data from the pop-up menu. The

    Cooperative - Enable this Portlet to Receive Data wizard appears. Alternatively, open a JSP file, ensure that it has focus, and select the

    Page | Cooperative | Cooperative - Enable this Portlet to Receive Data menu choice.

  3. Provide any appropriate values in the

    Cooperative - Enable this Portlet to Receive Data wizard, as described in Enabling cooperative targets. However, you should supply the following values:

    1. Browse to specify JSP.

    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 () 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 reference

Web Services Description Language (WSDL) 1.1

WebSphere Portal Information Center

XML Schema Part 2: Datatypes