Class Ozone.launcher.WidgetLauncher
Defined in: WidgetLauncher.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Ozone.launcher.WidgetLauncher(widgetEventingController)
This object is used launch other widgets.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Ozone.launcher.WidgetLauncher.getInstance()
Retrieves Ozone.eventing.Widget Singleton instance.
|
|
launchWidget(config, callback)
launches a Widget based on the config
|
Class Detail
Ozone.launcher.WidgetLauncher(widgetEventingController)
This object is used launch other widgets. To do so it requires a widgetEventingController
- Parameters:
- {Ozone.eventing.Widget} widgetEventingController Optional
- - widget eventing object which handles eventing for the widget
- Deprecated:
- Since OWF 3.7.0 You should use Ozone.launcher.WidgetLauncher.getInstance
Method Detail
<static>
Ozone.launcher.WidgetLauncher.getInstance()
Retrieves Ozone.eventing.Widget Singleton instance. This object is used launch other widgets.
this.widgetLauncher = Ozone.launcher.WidgetLauncher.getInstance(this.widgetEventingController);
launchWidget(config, callback)
launches a Widget based on the config
//Example for launching a widget
var widgetEventingController = Ozone.eventing.Widget.getInstance();
var widgetLauncher = Ozone.launcher.WidgetLauncher.getInstance(this.widgetEventingController);
var data = {
channel: channel,
message: message
};
var dataString = Ozone.util.toString(data);
widgetLauncher.launchWidget({
universalName: 'universal name of widget to launch', //universalName or guid maybe identify the widget to be launched
guid: 'guid of widget to launch',
title: 'title to replace the widgets title' the title will only be changed if the widget is opened.
titleRegex: optional regex used to replace the previous title with the new value of title
launchOnlyIfClosed: true, //if true will only launch the widget if it is not already opened.
//if it is opened then the widget will be restored
data: dataString //initial launch config data to be passed to a widget only if the widget is opened. this must be a string
});
- Parameters:
- {Object} config
- object see example for structure
- {Function} callback
- a function to be called once after the launchWidget is executed