Cooperative portlets


WebSphere Portal includes portlet applications using JSR 168 or IBM containers that demonstrate the interaction of portlets through the property broker. For more information, see Cooperative portlets.

All sample portlets are available in the wp_root/installableApps directory. Subsequent updates of these samples will be available from the portlet catalog by searching for navcode 1WP10004N. See Sample portlets for more information.

 

 

Shipping demo

The Shipping demo is available for both JSR 168 and IBM containers. This demo is an order shipment application that consists of several portlets that display orders and detailed information about those orders. The Shipping demo consists of the following portlets:

Order Summary lists the orders placed during a particular month. Each entry in the list contains an order ID and a customer ID.
Order Details provides details about an order, based on the order ID.
Customer Details provides details about a customer, based on the customer ID.
Tracking provides shipment tracking details for an order based on the tracking ID.
Accounts provides account details for an order, based on the order ID.

This portlet application is available in the c2asampleshipping.war in the wp_root/installableApps directory. install all portlets to the same page to obtain the benefits of cooperation and interaction between the portlets.

To run the Shipping demo:

  1. Navigate to the page that contains the Shipping portlets.

  2. Enter a valid month in the Enter month to display orders field of the Order Summary portlet. Use the full month name or the first three letters of the month. For example, Jan and January both display orders made in January.

  3. An icon renders next to items that allow additional actions. Click an icon to display a pop-up menu with actions specific to the selected item.

  4. The selection made from the pop-up menu updates other portlets on the page. For example, if you click the icon next to Order ID and the menu item Order details, the Order Details portlet is updated with the information about the selected order.

  5. Holding the Ctrl key while clicking the icon allows you to save your menu selection as a wire between the portlets. Next time you click the icon, your saved preferences are used and no menu selection is shown. Also, a different icon is rendered depending on whether a transfer selection has been wired.

Advanced options, such as broadcasting a source to all possible actions, or scattering a set of sources to all possible actions, are available in the Shipping demo. See Cooperative portlets for more information about these features.

 

 

Destination Guide demo

The Destination Guide demo is available for the IBM container only. It uses a clickable client-side image map to initiate the transfer of properties to other portlets. The source code demonstrates some of the features of the property brokers APIs used to customize the interaction between portlets. For example, a portlet developer can associate Click-to-Action menus with hot, clickable elements on an image map. This portlet application is available in the c2asampledestinationguidepp.war in the wp_root/installableApps directory.

 

 

Cooperative portlet using Struts

One of the portlets in the Shipping demo, Order Details, has been rewritten using the Struts Portlet Framework. It behaves the same way as the Order Details portlet, but demonstrates how to use cooperative portlets within the Struts framework. To test this portlet, replace the Order Details portlet from the Shipping demo with the portlet from the struts war file in the wp_root/installableApps directory.

For a list of war file names and a short description of each demo, see the cooperative samples section of Enable portlets for cooperation.

 

 

See also

Home |

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.