AnsweredAssumed Answered

pass window.postMessage data to widgets

Question asked by on Jan 12, 2016
Latest reply on Jan 13, 2016 by

Hi Everyone,


I have a jsp page which will send info by the postMessage function.


     window.postMessage(object, webappbuilderAppURL);


Then I am able to retrieved it by the following lines.


     window.addEventListener("message", onMessageReceived, false);

     function onMessageReceived(aEvent) {}


but it ONLY works inside the index.html page.


The question I have is, how can I pass the "object' to my widget?


is there any functions like publishData/onReceiveData/fetchDataByName in the widgets from the index.html page?