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.7. Broadcasting messages

In this section, we show how to send a broadcast message to all portlets on a page that have implemented the MessageListener interface. For example follow these steps:

1.
Create a new portlet project:
a. Select File → New → Portlet Project.
b. Enter Message as the project name and select WebSphere Portal V5.1 as Target server.
c. In the event handling page, check only the option Add message listener.
d. Click Finish.
2.
Open the MessagePortlet.java file located in the /Java Resources/JavaSource/message/ folder and modify the messageReceived() method to receive the broadcast message. You only need to check for a message of type DefaultPortletMessage, which is the type of message sent by ActionEventPortlet. Once the ...

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