WebSphere Portal
Cooperative portlets
WebSphere Portal includes four portlet applications that demonstrate the interaction of portlets through the property broker. For more information, see Cooperative portlets samples .
Shipping demo
The Shipping 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 - provdes 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/installabbleApps directory. You must install all portlets to the same page to obtain the benefits of cooperation and interaction between the portlets.
To run the Shipping demo:
- Navigate to the page that contains the Shipping portlets.
- 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.
- 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.
- 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.
- 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 Desination Guide demo 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/installabbleApps directory.
Cooperative portlet using Sruts
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 demostrates 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 c2asampleshippingstruts.war in the wp_root/installabbleApps directory.
Related information