Develop cooperative portlets

 

+
Search Tips   |   Advanced Search

 

 

Overview

Cooperative portlets interact share information. One or more cooperative portlets on a portal page can automatically react to changes from a source portlet triggered by an action or event in the source portlet. Portlets that are targets of the event can react so that users are not required to make repetitive changes or actions in other portlets on the page.

Cooperative portlets subscribe to a model for declaring, publishing, and sharing information with each other using the WebSphere Portal property broker. Portlets subscribe to the broker by publishing typed data items, or properties, that they can share, either as a provider or as a recipient.

The portlet that provides a property is called the source portlet. The properties that the source portlet publishes are called output properties. The portlet that receives a property is called the target portlet. The properties that are received by the target are called input properties.

Cooperative portlets can be source portlets, target portlets, or both.

A user launches a Click-to-Action event from an icon on the source portlet. Please note that while cooperative portlets can be implemented in various ways, Click-to-Action is a specific technique supported by the Rational Developer tool interface. The icon presents a pop-up menu containing the list of targets for the action. After the user selects a specific target, the property broker delivers the data to the target in the form of the corresponding portlet action.

Using the Click-to-Action delivery method, users can transfer data with a simple click from a source portlet to one or more target portlets, causing the target to react to the action and display a new view with the results. The user can also broadcast the property to all portlets on the page that have declared an action associated with a matching input property.

 

Click-to-Action support

The Click-to-Action support is available for basic, Faces, and Struts portlets that use the IBM portlet API.

Portlet Type WebSphere Portal 5.0.2.x and 5.1
JSR 168 API IBM portlet API
Basic portlet Not supported

Note: The generic WebSphere Portal cooperative portlet capability is supported. However, the Rational portlet tool Click-to-Action capabilities are not available.

Supported
Faces portlet Supported
Struts portlet Supported

Click-to-Action portlets do not work with the pager function for either the WebSphere Portal or the WebSphere Portal Test Environment when included in a Faces JSP page that includes the <c2a:encodeProperty> tag along with the <hx:pagerDelux> tag or the <hx:pagerWeb> tag. To use Click-to-Action and the pager function of the data table together in a Faces JSP page, use the <hx:pagerSimple> tag or the <hx:pagerGoto> tag instead of the <hx:pagerDelux> tag or the <hx:pagerWeb> tag.

 

Cooperative portlet icons

Icon Description Appears in

Click-to-Action Source Portlet icon

Cooperative Source Portlet Project Explorer view and the Portlet Deployment Descriptor editor

Click-to-Action Target Portlet icon

Cooperative Target Portlet Project Explorer view and the Portlet Deployment Descriptor editor

Click-to-Action Source and Target Portlet icon

Cooperative Source and Target Portlet Project Explorer view and the Portlet Deployment Descriptor editor

Click-to-Action Output Property (encodeProperty) icon

Click-to-Action Output Property (encodeProperty) JSP Pages in Page Designer and the Palette view

Click-to-Action Output Properties (encodeProperties) icon

Click-to-Action Output Properties (encodeProperties) JSP Pages in Page Designer and the Palette view

 

JSR 168 cooperative portlets

Although Click-to-Action behavior is not enabled for the JSR 168 portlet API, JSR 168 portlet projects can run and display cooperative behavior in the WebSphere Portal Test Environment, through the use of wires. To enable this capability, follow these configuration steps:

  1. Create a WebSphere Portal Test Environment server

  2. Double-click WebSphere Portal Test Environment in the Servers view to open the server configuration file.

  3. Select the Portal tab in the server editor.

  4. Select the Enable base portlets for portal administration and customization check box.

  5. Save the server configuration file.

  6. Select the project, right-click and choose Run > Run on Server.

  7. Click Edit Pages.

  8. Select Wires and add up to five wires. Click Done.

  9. You will be returned to the view mode. The sample portlets will be enabled for cooperation. However, if you restart the WebSphere Portal v5.1 Test Environment, add the wires again to enable cooperation.

 

 

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