O'Reilly logo

IBM Rational Application Developer V6 Portlet Application Development and Portal Tools by Ryan Wilson, Gianfranco Rutigliano, George Kroner, Belen Gonzalez, Karla Galvan, Cristiano Cesario, Juan R. Rodriguez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.4. DefaultPortletMessage

This object implements the PortletMessage interface and provides the basic functionality needed for sending string messages between portlets on the same page regardless of the portlet application.

Note

Since portlet messaging can be accomplished across portlets in different applications, this is the recommended way to implement portlet messaging.

If you broadcast a DefaultPortletMessage to null, it will be sent to all portlets on the page implementing the MessageListener interface. Example 7-2 illustrates sending a simple broadcast message to all portlets on the same page regardless of application affiliation.

Example 7-2. Broadcasting a message to all portlets on a page
PortletMessage msg = new DefaultPortletMessage("Some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required