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.
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.
Navigation
PeopleTools, Portal, Inter Window Communication.
Navigate to the content reference definition:
PeopleTools, Portal, Structure and Content.
Browse through the folder hierarchy in the portal registry.
Click the Edit link for a content reference definition.
Click the IWC Message Events link.
To create an interwindow communication publication message:
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.
Select Pub as the message event type.
Select either Change or Click as the field event type.
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.
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.
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.
To subscribe to an interwindow communication message:
In the Event Name field, enter the name of the message as it was defined in the publication event.
Select Sub as the message event type.
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.
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.
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.
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.