+

Search Tips   |   Advanced Search

Client side: WebDock portlet as subscriber


To enable the WebDock portlet to subscribe to events from other portlets on the same page, set the Subscribe event preference in the Edit Shared Settings mode to true. By default, the portlet subscribes to the global topic...

The portlet expects a URL or a URL fragment as the publisherData, which sets the src attribute of the iFrame. The portlet will display content from the new URL.

URL template preferences can be used to add a prefix to publisherData. For example, if you set URL template to...

...and publisherData is /xyz, the src attribute of the iFrame is set to...

Subscribe to a topic using...

topicName is the topic to subscribe to. refOrName is an object reference or function name.

To customize URL generation, use IPC.js...

com_ibm_portlets_vwat_WebDockScriptingContext.prototype.processSubscribedEvent = function(originalUrl, currentUrl, URLTemplate, evtData)
{
    // Default code 
    return (URLTemplate + evtData);
 
    // Uncomment to customize
    /*
    if (evtData.id) {
     return (URLTemplate + evtData.id);
    }
    */
};

The return value is used as the URL for the subscriber WebDock portlet.

To update...

  1. Extract IPC.js from WebDockPortlet.war

  2. Go to...

      PORTAL_HOME/bp/wp.vwat.webdock/installableApps

  3. Make the changes in the extracted IPC.js file.

  4. Import the modified IPC.js file back into WebDockPortlet.war.

  5. Log in to WebSphere Portal, and run...

      Administration | Portlet Management | Web Modules | WebDockPortlet.war | Update


Parent: Web application bridge inter-portlet communication