Publishing and Subscribing to IWC Messages

This topic discusses:

  • Identifying HTML field IDs.

  • Publishing interwindow communication messages.

  • Subscribing to interwindow communication messages.

  • Special uses of interwindow communication.

To participate in interwindow communication as a triggering field, as the acted upon field, or as a message data field, the HTML field must have a value for the id attribute, and this value must be unique within the HTML page domain. You can use your browser's built-in developer tools to examine the HTML code for a page and to extract the value of the id attribute for a field. Developer tools are available as part of Chrome, Firefox, Internet Explorer, and Safari. In addition, there are third-party add-ons (for example, Firebug) that provide an alternative toolset for web developers.

Image: Identifying the HTML id attribute using web developer tools

In the following example showing the web developer tools integrated into Firefox, the Search button in the Customer Information pagelet has been selected.

Identifying the HTML id attribute using web developer tools

In developer tools pane at the bottom of the browser window, the corresponding line of code has been highlighted by the web developer tool:

<input id="#ICSearch" class="PSPUSHBUTTONTBSEARCH" type="button" title="Search (Alt+1)" alt="Search (Alt+1)" tabindex="20"
onclick="javascript:submitAction_win5(document.win5, '#ICSearch');" value="Search" name="#ICSearch"></input>

Within that line of HTML code, the id attribute and its value (#ICSearch) has been enclosed in a red rectangle:

id="#ICSearch"

Use the IWC Message Events page to define interwindow communication publication and subscription events.

Image: IWC Message Events page (publication event)

This example illustrates the fields and controls on the IWC Message Events page for a publication event.

IWC Message Events page (publication event)

To create an interwindow communication publication message:

  1. In the Event Name field, enter a name for this message. Because messages are subscribed to by event name only, this value should be unique for all messages defined within this portal.

  2. Select Pub as the message event type.

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

  4. In the HTML Field Name field, enter the HTML field ID of the triggering field as it appears in the HTML source.

    Important! To participate in interwindow communication as the triggering field, as the acted upon field, or as a message data field, the HTML field must have a value for the id attribute, and this value must be unique within the HTML page domain. See Identifying HTML Field IDs for more information.

  5. Enter the HTML field ID of the field (or fields) that you want to publish as the message data. Separate multiple field IDs with a comma.

    Note: The triggering field and the message data field are not necessarily the same field.

  6. Save your changes.

Note: While the Map button is displayed for all interwindow event definitions, the Map button is active only for push notification event subscriptions of type Server Sub. See Special Uses of Interwindow Communication.

Use the IWC Message Events page to define interwindow communication publication and subscription events.

Image: IWC Message Events page (subscription event)

This example illustrates the fields and controls on the IWC Message Events page for a subscription event.

IWC Message Events page (subscription event)

To subscribe to an interwindow communication message:

  1. In the Event Name field, enter the name of the message as it was defined in the publication event.

  2. Select Sub as the message event type.

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

    Important! For iScript and Pagelet Wizard pagelets, a full refresh is the only valid event type.

  4. In the HTML Field Name field for a partial refresh subscription only, enter the HTML field ID of the acted upon field as it appears in the HTML source.

    Important! For a full refresh subscription, the field to be acted upon is required to be blank.

    Important! To participate in interwindow communication as the triggering field, as the acted upon field, or as a message data field, the HTML field must have a value for the id attribute, and this value must be unique within the HTML page domain. See Identifying HTML Field IDs for more information.

  5. In the Message Data field, enter the HTML field ID of the field (or fields) that you want to receive the message data. Specify receiving fields in the same order as the message data is defined in the publishing message; separate multiple fields IDs by a comma.

    Note: For a full refresh subscription, the message data field is optional.

  6. Save your changes.

Note: While the Map button is displayed for all interwindow event definitions, the Map button is active only for push notification event subscriptions of type Server Sub. See Special Uses of Interwindow Communication.

Several PeopleTools features use interwindow communication in specific and unique manners:

  • Interwindow communication can be used to synchronize changes between pivot grid pagelets. The publishing field name is always PVGPUB; the subscribing field name is always PVGSUB. In addition, there is a specific nomenclature for specifying a filter or a prompt as either the published message data or as the subscribing field.

    See Pivot Grid Pagelet Overview for more information.

  • Interwindow communication can be used to subscribe to push notification events defined on the server. Always select Server Sub as the event type; then use the Map Event Data To Page Elements page to complete configuration of the remaining items by mapping event data to page elements.

    See Subscribing to Eventsfor more information.