Configuring Interwindow Communication

This chapter presents an overview of interwindow communication (IWC) and discusses how to:

Click to jump to parent topicUnderstanding Interwindow Communication

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.

Click to jump to top of pageClick to jump to parent topicPrerequisites

This table lists the prerequisite tasks that you must complete before setting up interwindow communication.

Prerequisite

Cross-Reference

Create pagelets

See Developing and Registering Pagelets.

Register pagelet in the current portal system.

See Registering Homepage and Template Pagelets.

Click to jump to top of pageClick to jump to parent topicCommon Elements Used in This Chapter

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.

Click to jump to top of pageClick to jump to parent topicPage and Pagelet Types

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.

  • Partial page refresh

  • Refresh with new parameters

Component pagelet

The more frequently used pagelet built by application developers using PeopleSoft Application Designer.

  • Partial page refresh

  • Refresh with new parameters

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

Click to jump to top of pageClick to jump to parent topicEvents and Messages

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:

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.

Click to jump to parent topicConfiguring Interwindow Communication Publish and Subscribe Options

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicPages Used to Configure Interwindow Communication Publish and Subscribe Options

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.

Click to jump to top of pageClick to jump to parent topicConfiguring Fields to Publish

Access the Content Reference Message Events page. (Select PeopleTools, Portal, InterWindow Communication.)

  1. Enter a value in the Event Name field.

  2. Select Pub as the message event type.

  3. Select either Change or Click as the field event type.

  4. Enter the field name as it appears in the HTML source.

  5. Enter the names of the fields that you want to publish.

  6. Save the page.

Click to jump to top of pageClick to jump to parent topicConfiguring Fields to Subscribe

Access the Content Reference Message Events page. (Select PeopleTools, Portal, InterWindow Communication.)

  1. Enter a value in the Event Name field.

  2. Select Sub as the message event type.

  3. Select either Full Refresh or Partial Refresh as the field event type.

  4. Enter the name of the subscribing field as it appears in the HTML source.

  5. Enter the names of the fields that you want to publish.

  6. Save the page.