Namespace OWF.Launcher
Defined in: Widget.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
This object is used launch other widgets.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
OWF.Launcher.getLaunchData()
Retrieves initial launch data for this widget if it is opened by another widget.
|
| <static> |
OWF.Launcher.launch(config, callback)
Launches a Widget based on the config.
|
Method Detail
<static>
{Object}
OWF.Launcher.getLaunchData()
Retrieves initial launch data for this widget if it is opened by another widget.
var launchData = OWF.Launcher.getLaunchData();
if (launchData != null) {
var data = Ozone.util.parseJson(launchData); //in this example the data object has two fields: channel and message
if (data != null) {
//do something with the data
OWF.Eventing.subscribe(data.channel, function() {});
}
}
- Returns:
- {Object} data object which contains initial launch data for the widget
<static>
OWF.Launcher.launch(config, callback)
Launches a Widget based on the config.
OWF.Launcher.launch({
guid: 'guid_of_widget_to_launch',
launchOnlyIfClosed: true, //if true will only launch the widget if it is not already opened.
//if it is opened then the widget will be brought to focus
data: dataString //initial launch data to be passed to a widget only if the widget is opened. This must be a string.
}, callback);
- Parameters:
- {Object} config
- object see example for structure
- {Function} callback
- a function to be called once after the launchWidget is executed