Developing cooperative portlets

The term cooperative portlets refers to the capability of portlets on a page to interact with each other by sharing 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. This provides a coordinated and consistent behavior between the portlets on the page and enhances users' overall experience.

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.

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

Currently, Rational® tools support two methods for developing cooperative portlets:
  1. Click-to-Action
  2. Wires
Refer to the sections below for more details about these cooperative mechanisms.

Click-to-Action support

A user launches a Click-to-Action event from an icon on the source portlet. 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. Please note that while cooperative portlets can be implemented in various ways, Click-to-Action is a specific technique supported by the Rational Software Development Platform tool interface.

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 is available for basic, Faces, and Struts portlets as follows:

Table 1. Click-to-Action tag support by portlet type
Portlet Type WebSphere Portal 5.0.2.3 and 5.1
JSR 168 API IBM® portlet API
Basic portlet Not supported.
Note: The generic WebSphere Portal cooperative portlet capability, based on WebSphere property broker, is supported in v5.1.
Supported
Faces portlet Supported
Struts portlet Supported

Wires support

Wiring is a technique for connecting cooperative portlets so that changes in the source portlet automatically update the target portlets without any user interaction. A wire is used to automatically transfer properties to target portlets without a prompt (as opposed to the menu provided by the Click-to-Action mechanism).

The basic wiring capabilities provided by the portal tooling support both IBM API and JSR 168 portlets for WebSphere Portal v5.1. These capabilities are equivalent to those provided by the Portlet Wiring Tool in WebSphere Portal 5.1.

The following general limitations exist for portlet wiring in this product:
  • Wiring is only supported for portlets on the same page (Cross-page wiring is supported by WebSphere Portal 5.1.0.1, although it is not currently supported by Portal Designer.)
  • Only same-API wiring is supported (IBM API-to-JSR 168 API wires are not supported by WebSphere Portal 5.1.)
  • Only global wires are supported. Personal wires, which enable you to configure user-specific wiring, are not supported.

Cooperative portlet icons

Table 2. Cooperative portlet icons in Project Explorer view, Palette view, and Page Designer
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
Related concepts
Wiring 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
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.