This chapter presents an overview of interwindow communication (IWC) and discusses how to:
Configure fields to publish.
Configure fields to subscribe.
Interwindow communication (IWC) is a frame-to-frame messaging mechanism that enables browser window objects—such as pages or pagelets—to be aware of and react to field level data changes that occur in other browser window objects that share the same browser window. Interwindow communication enables you to publish field-level changes as they occur so that any subscribing page or pagelet becomes instantly aware of the change and then, can act on it in real-time.
Here is a simple example. On a dashboard you have the Employees pagelet, which contains a list of names. Also on the dashboard you have an Employee Projects pagelet, which contains project listings for an employee. Interwindow communication enables you to click a name in the Employee pagelet and have the Employee Projects pagelet retrieve the project listing for the corresponding name.
Note. Interwindow communication works at level-0 only. Pages or pagelets must be completely loaded or the process fails.
Process Flow
This diagram presents the flow of events and actions that comprise the publish and subscribe process of interwindow communication.
IWC process flow
Step |
Description |
1. Triggering event occurs. |
User clicks a button or link or changes the value of a field that is configured to publish. |
2. IWC generates message. |
Simple string formatted message temporarily stored to IWC-related table. |
3. Pagelet reads message. |
Listener checks to see if loaded pagelets subscribe to the message. |
4. Determine whether update action is necessary. |
Check the document object model of the pagelet and run a field change event if necessary. |
5. Determine whether refresh is necessary. |
If configured to refresh, page refreshes partially or with new parameters. |
Interwindow communication does not depend on any template, frame, or iframe and works seamlessly throughout PeopleSoft applications in almost any scenario for which you require pagelet to pagelet interaction. You can configure IWC to operate between pagelets and also within the same pagelet, if necessary. Although IWC is ideal for use with related content and WorkCenter pages, IWC is independent of both technologies and IWC does not depend on PeopleSoft Integration Broker.
This table lists the prerequisite tasks that you must complete before setting up interwindow communication.
Prerequisite |
Cross-Reference |
Create pagelets |
|
Register pagelet in the current portal system. |
Event Name |
Enter any unique value that identifies the event for this page or pagelet. |
HTML Field Name |
Enter the name of the field as it appears in the HTML source code. |
Message Data |
Enter the names of the fields that you want to publish. Separate multiple field names with commas. |
Partial page refresh |
Select to update a section of the page or pagelet bypassing a full server trip and limiting code and markup changes. This option eliminates the page flicker associated with refreshing. |
Refresh with parameters |
Select to update a page or pagelet while passing the necessary parameters to complete the refresh and perform any required actions. |
This table describes the types of pages and pagelets that IWC supports and the type of refresh that is available to each page and pagelet:
Page or Pagelet Type |
Description |
Refresh Support |
Transaction page |
The standard PeopleSoft page that appears in the target content area. |
|
Component pagelet |
The more frequently used pagelet built by application developers using PeopleSoft Application Designer. |
|
iScript pagelet |
The PeopleCode-based pagelets built by using Pagelet Wizard or by writing HTML. |
Refresh with new parameters |
See Also
Working with Homepages, Dashboard Pages, and Pagelets
Developing and Configuring Related Content Services
Interwindow communication involves publishing and subscribing to messages.
Publishing
The first part of interwindow communication is to trigger the publication of a message. Publishing can be initiated by these JavaScript events that occur in the browser:
OnChange
The user changes a value in a field on a transaction page or pagelet.
OnClick
The user clicks a button or link on a transaction page or pagelet.
Note. The link must have a unique identifier and be searchable in the document object model (DOM).
Subscribing
The second part of interwindow communication is to subscribe to the message that other window sends. The application calls an event listener in the OnLoad event of every subscribing page in the template. This event listener runs the callback function from the subscribing page or pagelet using the data that is received from the publishing page. If the page or pagelet subscribes to the event, then the receiving window acts on the message.
After a message is published, each pagelet checks to determine whether it subscribes to this message. If the page or pagelet subscribes to the message, then it can refresh the page as configuration determines.
This section discusses how to:
Configure fields to publish.
Configure fields to subscribe.
Page Name |
Definition Name |
Navigation |
Usage |
Content Reference Message Events |
IWC_CREF_EVENTS |
PeopleTools, Portal, InterWindow Communication |
Configure fields to publish. Configure fields to subscribe. |
Access the Content Reference Message Events page. (Select PeopleTools, Portal, InterWindow Communication.)
Enter a value in the Event Name field.
Select Pub as the message event type.
Select either Change or Click as the field event type.
Enter the field name as it appears in the HTML source.
Enter the names of the fields that you want to publish.
Save the page.
Access the Content Reference Message Events page. (Select PeopleTools, Portal, InterWindow Communication.)
Enter a value in the Event Name field.
Select Sub as the message event type.
Select either Full Refresh or Partial Refresh as the field event type.
Enter the name of the subscribing field as it appears in the HTML source.
Enter the names of the fields that you want to publish.
Save the page.