Class Index | File Index

Classes


Namespace OWF.Intents


Defined in: WidgetIntents.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
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.
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 Oct 05 2012 16:51:04 GMT-0400 (EDT)