run a function in the widgetA after the widgetB is loaded

464
1
08-17-2016 06:32 AM
NatashaManzuiga
Occasional Contributor

Hi all, I'm trying to run a function in the widgetA after the widgetB is loaded, what is the best way to do this?

Thanks,

Naty

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

Naty,

  In WidgetB I would use publishData to tell WidgetA that it is loaded. then use WidgetManager to get a reference to WidgetA and call its function. In the WAB stemapp widgets folder there is samplewidgets folder with a widgetcommunication folder with examples of code for widget communication.

0 Kudos