Broadcast

The Dekho client sends out a broadcast via the ExternalInterface when certain events have occurred. The broadcast contains a comma delimited string of session id and event type. Specific details of the event can be retrieved by calling the Dekho Session Web Service.

 

Possible broadcasts are (where 123456 equals the session id):

when a new map has been chosen:

map,123456

when a change to the session has occurred, eg, map extent (zoom, pan), selection, redline, legend:

session,123456

when a session time out has occured:

sessiontimeout,123456

when a layout export has occurred:

layout,123456

when a report export has occurred:

report,123456

when a custom tool event has occurred (Custom Extension):

custom,123456

When Dekho sends out a broadcast it calls the dekhoBroadcast external function. In JavaScript this function is defined as:

function dekhoBroadcast( value ) {

}

To receive the broadcast the parent application must contain the dekhoBroadcast function. The function must belong to the same page as Dekho. If using frames it must be located in the same frame as Dekho.
Example of function:

function dekhoBroadcast ( value ) {

 

  var action = value.split(",")[0];

  var sessionid = value.split(",")[1];

 

  //...

}

It is important to monitor this function for possible session time outs. The Dekho client can be set to have session’s time out by the Administrator. When a session time out occurs all calls to the Dekho web services generate a fault response. Once a session has timed out, the Dekho client needs to closed or reloaded to create a new session. The dekhoBroadcast function provided by Dekho’s Index.html page gives the user an option to reload the client when a session has timed out. This function will have to be modified if a different behavior is desired.


Messages