Class Index | File Index

## Classes

- _global_
- OWF
- OWF.Chrome
- OWF.DragAndDrop
- OWF.Eventing
- OWF.Intents
- OWF.Lang
- OWF.Launcher
- OWF.Log
- OWF.Metrics
- OWF.Preferences
- OWF.RPC
- OWF.Util
- Ozone.chrome.WidgetChrome
- Ozone.dragAndDrop.WidgetDragAndDrop
- Ozone.eventing.Widget
- Ozone.eventing.WidgetProxy
- Ozone.lang
- Ozone.launcher.WidgetLauncher
- Ozone.launcher.WidgetLauncherUtils
- Ozone.log
- Ozone.metrics
- Ozone.pref.PrefServer
- Ozone.state.WidgetState
- Ozone.state.WidgetStateHandler
- Ozone.util
- Ozone.util.pageLoad

# Namespace OWF.Intents

Defined in: WidgetIntents.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| OWF.Intents

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | OWF.Intents.receive(intent, handler) Register to receive an Intent
<static> | OWF.Intents.startActivity(intent, data, handler, dest) Starts an Intent.

Namespace Detail
OWF.Intents
Method Detail
<static> OWF.Intents.receive(intent, handler)
Register to receive an Intent

    OWF.Intents.receive(
      {
        action: 'Plot',
       dataType: 'application/vnd.owf.latlon'
      },
      function(sender,intent, data) {
        //do something with the data
      }
    );

Parameters:
{Object} intent
  Object representing the Intent
{String} intent.action
  Name of the Intent
{String} intent.dataType
  Describes the data that will be sent with the intent. It is recommended that this be a MIME type.
{Function} handler
  Function to be executed once an Intent has been received
{String} handler.sender Optional
  The first argument passed to the handler function is the id of the sender of the message. See OWF.getIframeId for a description of this id.
{Object} handler.intent Optional
  The second argument passed to the handler function is the intent itself.
{Object} handler.data Optional
  The third argument passed to the handler function is the intent data.

<static> OWF.Intents.startActivity(intent, data, handler, dest)
Starts an Intent. This will send the intent and data to one or more widgets. If this launches a widget, it sets the launch data to the JSON string { intents: true }.

    OWF.Intents.startActivity(
      {
       action: 'Plot',
       dataType: 'application/vnd.owf.latlon'
      },
      {
        lat: 0,
        lon: 0
      },
      function(dest) {
        //dest is an array of destination widget proxies
      }
    );

Parameters:
{Object} intent
  Object representing the Intent
{String} intent.action
  Name of the Intent
{String} intent.dataType
  Describes the data that will be sent with the intent. It is recommended that this be a MIME type.
{Object} data
  Data to be sent with the intent
{Function} handler
  Function to be executed once the Intent has been sent to a destination widget
{Object[]} handler.dest Optional
  The first argument passed to the handler function is the id(s) of the recipient(s) of the message. See OWF.getIframeId for a description of this id.
{Object[]} dest Optional
  Explicitly define which widgets will get this intent using Widget Proxies

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Dec 21 2012 17:25:00 GMT-0500 (EST)