7.1 Portlet messaging

 <  Day Day Up  >  

One of the most significant advantages of the Portlet architecture is the portlets' ability to communicate with each other to create dynamic, interactive applications. Portlets can use messages to share information, notify each other of a user 's actions or simply help better manage screen real estate.

Messages can be sent to all portlets on a page, to a specific, named portlet or to all portlets in a single portlet application. To send a message to all portlets on a page, you must send an instance of the DefaultPortletMessage.

In order to make full use of this potential, you need to adequately architect the entire portlet application, anticipating inter-portlet communication. Attempting to implement effective and meaningful message after significant portlet development will cause some difficulty and may require the entire application to be overhauled. This is true for several reasons. For example, access to certain storage objects, such as PortletData, is limited to certain modes. Therefore, if the initial design of an application makes significant use of the PorltetData object, implementing messaging later to share configuration information would require a considerable effort. Furthermore, in order to reduce or eliminate code, action event and message event functionality can be combined into a common method. However, to achieve this, it is necessary to consider the information passed via the action or message objects.

First, you must become familiar with the core objects used in the messaging architecture.

 <  Day Day Up  >  


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net