Is it possible to listen to state events of other widgets?

17 views
Skip to first unread message

sirst...@gmail.com

unread,
Aug 24, 2016, 5:53:25 PM8/24/16
to ozoneplatform-users
I'm running an application on Ozone 7.0.1 GA. We are able to launch one widget from another by calling OWF.Launcher.launch. When we pass a callback as the second argument to that function, on successful launch the callback gets an object that provides the GUID of the newly launched widget. Can we use that GUID in some manner to listen for state events (e.g. "close") -- that is, can the launcher listen to the launchee's state events?

Thanks,

David

Ross Pokorny

unread,
Aug 29, 2016, 7:31:29 AM8/29/16
to ozoneplat...@googlegroups.com
The Widget State API was designed to allow that to be possible, but that
capability was rarely if ever tested. If you look at the jsdocs for
Ozone.state.WidgetState, you will see that the configuration object that gets
passed into the constructor can take a `widgetGuid` parameter which can be
used to listen for state events from other widgets.

Ross Pokorny
Ozone Developer
Reply all
Reply to author
Forward
0 new messages