Class Index | File Index

Classes


Namespace OWF


Defined in: Widget.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
OWF
Field Summary
Field Attributes Field Name and Description
<static>  
OWF.relayFile
The location of the widget relay file.
Method Summary
Method Attributes Method Name and Description
<static>  
Returns the name of the Container the Widget is in
<static>  
Returns the URL of the Container the Widget is in
<static>  
Returns the version of the Container the Widget is in
<static>  
Returns an object containing information on the current OWF theme
<static>  
Returns type of dashboard in which the widget is opened.
<static>  
Returns the Widget Id
<static>  
Returns instance GUID of the widget.
<static>  
OWF.getOpenedWidgets(callback)
Gets all opened widgets on the current dashboard.
<static>  
OWF.getUrl()
Returns URL of the widget.
<static>  
OWF.getVersion()
Returns version of the widget.
<static>  
Returns definition GUID of the widget.
<static>  
Returns whether or not the dashboard in which the widget is opened is locked.
<static>  
This function should be called once the widget is ready and all initialization is completed.
<static>  
OWF.ready(handler, scope)
Accepts a function that is executed when Ozone APIs are ready for use
Namespace Detail
OWF
Since:
OWF 5.0
Field Detail
<static> OWF.relayFile
The location of the widget relay file. The relay file should be defined globally for the entire widget by setting OWF.relayFile to the relay file url, immediately after including the widget bundle javascript. If the relay is not defined at all it is assumed to be at /[context]/js/eventing/rpc_relay.uncompressed.html. The relay file must be specified with full location details, but without a fully qualified path. In the case where the relay is residing @ http://server/path/relay.html, the path used must be from the context root of the local widget. In this case, it would be /path/relay.html. Do not include the protocol.
<script type="text/javascript" src="../../js-min/owf-widget-min.js"></script>
<script>
      //The location is assumed to be at /[context]/js/eventing/rpc_relay.uncompressed.html if it is not
      //set the path correctly below
      OWF.relayFile = '/owf/js/eventing/rpc_relay.uncompressed.html';
      //...
</script>
Since:
OWF 5.0.0
Method Detail
<static> OWF.getContainerName()
Returns the name of the Container the Widget is in

<static> OWF.getContainerUrl()
Returns the URL of the Container the Widget is in

<static> OWF.getContainerVersion()
Returns the version of the Container the Widget is in

<static> {Object} OWF.getCurrentTheme()
Returns an object containing information on the current OWF theme
			var themeObj = OWF.getCurrentTheme();
Returns:
{Object} Returns an object below:
{
//name of the theme
themeName: 'theme-name',

//describes color contrast of the theme. This may be one of 3 values:
// 'standard' (colors provide no special contrast)
// 'black-on-white' (black on white color contrast)
// 'white-on-black' (white on black color contrast)
themeContrast: 'black-on-white',

//this field is a number of the fontSize in pixels
themeFontSize: 12
}

<static> OWF.getDashboardLayout()
Returns type of dashboard in which the widget is opened. [portal, desktop, accordion, tabbed]

<static> {String} OWF.getIframeId()
Returns the Widget Id
//decode and retrieve the widget's unique id
var complexIdString = OWF.getIframeId();
var complexIdObj = owfdojo.toJson(complexIdString);

//complexIdObj will look like
// {
//  //widget's uniqueId
//  id:"49cd21f0-3110-8121-d905-18ffa81b442e"
// }

//get Widget's uniqueId
alert('widget id = ' + complexIdObj.id);
Returns:
{String} The widgetId is a complex JSON encoded string which identifies a widget for Eventing. Embedded in this string is the widget's uniqueId as the 'id' attribute. There is other data is in the string which is needed for Eventing and other APIs to function properly. This complex widgetId string may be used in the OWF.Eventing.publish function to designate a specific recipient for a message. Additionally, once subscribed to a channel via OWF.Eventing.subscribe during the receipt of a message, the sender's widgetId is made available as the first argument to the handler function.

<static> OWF.getInstanceId()
Returns instance GUID of the widget.

<static> OWF.getOpenedWidgets(callback)
Gets all opened widgets on the current dashboard.
			OWF.getOpenedWidgets(function(openedWidgets) {
				
			});
Parameters:
{Function} callback
function to execute when opened widgets are retrieved from OWF. Function is passed an array of objects with the structure below:
{
id: 'instance guid of widget',
frameId: 'iframe id of widget',
widgetGuid: 'widget guid of the widget',
url: 'url of the widget',
name: 'name of the widget'
}

<static> OWF.getUrl()
Returns URL of the widget.

<static> OWF.getVersion()
Returns version of the widget.

<static> OWF.getWidgetGuid()
Returns definition GUID of the widget. This is auto generated by OWF when the widget was brought in an OWF instance.

<static> OWF.isDashboardLocked()
Returns whether or not the dashboard in which the widget is opened is locked.

<static> OWF.notifyWidgetReady()
This function should be called once the widget is ready and all initialization is completed. This will send a message to the container which in turn may notify other widgets

<static> OWF.ready(handler, scope)
Accepts a function that is executed when Ozone APIs are ready for use
Parameters:
{Function} handler
Function to execute when OWF APIs are ready
{Object} scope
The scope (this reference) in which the function is executed. If omitted, defaults to the browser window.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Oct 05 2012 16:51:04 GMT-0400 (EDT)