Establishing Interportlet Communications
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Interportlet communications (IPC)—also called portlet-to-portlet communications—refers to how an event in one portlet controls some aspect of behavior in another portlet. Some examples of interportlet communications are:
Service Pack 4 of BEA WebLogic Portal 8.1 introduced a relatively simple tool for implementing interportlet communications. This tool—a dialog box in WebLogic Workshop—allows you to easily add event handlers to a portlet and then add actions for those handlers to fire when they detect the event on another portlet.
This document described how to establish IPC by implementing event handlers. It contains these subjects:
Earlier versions of WebLogic Portal allowed you to establish interportlet communications by using such techniques are adding listenTo()
methods or backing files on page flow portlets. WebLogic Portal 8.1 with Service Pack 4 introduced a new IPC model based upon event handlers, Java objects that listen for predefined events on other portlets in the portal and fire actions when that event occurs.
Event handlers "listen" for events raised on subscribed portlets and fire an action when a specific event is detected. Event handlers can listen and react to the following types of events:
Event actions depend upon the type of event being raised. Except for portal events, all other events can be identified in the Events field on the Event Handler tool. Events available with the portal event handler are listed in Table 1-1.
Returns to its normal state from either a maximized or minimized state |
|
A custom event is an event that you define; in other words, it is not an event provided out-of-the-box with WebLogic Portal 8.1. A custom event can pass a developer-defined payload or fire any other predefined action. Custom events can be fired declaratively or based on a methods called in a backing file. A user will be able to specify that an event should be handled by a method in a backing file.
The event handlers fire an action on the listening portlets when that handler detects an event from another portlet in the application; for example, when the user minimizes the appropriate portlet a portal event called onMinimize might cause the handler listening for it to fire an action that invokes a backing file attached to it.
Table 1-2 lists the event actions available.
The IPC Tool included in WebLogic Workshop makes implementing event handlers relatively easy. To launch the tool, do the following:
The entire process of setting up an event handler can all be handled by using this tool. What you need to do is:
For specific details on using the event handler tool, please refer to How Do I: Establish Interportlet Communications with WebLogic Workshop? in the WebLogic Workshop online help.
![]() ![]() |
![]() |
![]() |