IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-06-13T17:47:06Z by UK8F_Sachin_Thakkar
2 Posts

Pinned topic Wiring widgets on different pages

‏2012-06-12T16:05:26Z |
Is it possible to wire widgets which are on different pages?

For example, On Page 1, I am using Data Viewer to show data.
Now when I click on a particular column, I want to update other Data Viewer widget which is on a different page.

Also, I want to switch between these two pages without losing their current state.

Please let me know if these use cases are possible and how.

I am working on Mashup Center 3.0

Thanks in advance.
Updated on 2012-06-13T17:47:06Z at 2012-06-13T17:47:06Z by UK8F_Sachin_Thakkar
  • drdamour
    52 Posts

    Re: Wiring widgets on different pages

    ‏2012-06-12T22:13:12Z  in response to UK8F_Sachin_Thakkar
    AFAIK: It is possible, but not Out of the Box.

    You have to have two browser windows (or tabs) active and you have to write a custom widget that sends events from one window to the other. It's not a simple API to deal with, and there's a ton of gotchas. The one i wrote i called an "Event Transporter Widget". It worked based on the window.opener DOM LEVEL I property (and a bit of parentWindow too). Making it work in all browsers is especially tricky. You have to put the widget on both pages, and because the new window is loaded asynchronously, you need it to make a call back to the original window.

    At least that's how i solved it.

    FYI: If you change the current browser window to a new page, the previous page state info will be lost. i bet there's a way to capture that state and restore it with a custom widget, but that sounds very hard.

    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
    • UK8F_Sachin_Thakkar
      2 Posts

      Re: Wiring widgets on different pages

      ‏2012-06-13T17:47:06Z  in response to drdamour
      Thanks drdamour.

      Appreciate your crisp answer and pointers on other workarounds.

      I was wondering about following scenario
      a) Instead of having tabs or multiple pages, have all widgets on same page.
      b) Upon reaching this page, show say 3 main widgets and keep other widgets minimized.
      c) Upon some action, pass the message to few minimized widgets and maximize them and minimize earlier maximized widgets.

      Is this possible through configuration ?
      Is this possible programmatically?

      If yes, please let me know how it can be achieved.

      Thanks in advance.