Entourage UI JavaScript API

The following javascript functions provide the means to instantiate and modify behaviors and widgets.

App.getControl

Get an instance of a control that is already declared.

void App.getControl(id,type,callback)
Argument Description
id The unique identity of the widget to be retrieved.
type The widget type that is to be retrieved.
callback The function that will be called when the reference to the widget is retrieved. *Note that when the function is called, the this keyword refers to the instance of the widget.

App.createControl

Create a control from a DOM element.

void App.createControl(id,type, args, callback)
Argument Description
id The unique identity to assign the widget.
type The widget type to assign to the widget.
callback The function that will be called once the widget has been created. *Note that when the function is called, the this keyword refers to the instance of the widget.

jQuery.fn.createControl

Create a control with jQuery plugin syntax.

object jQuery.fn.createControl(type,args,callback)
Argument Description
type The widget type to assign to the widget.
args Initial attributes that will be passed into the build function of the widget.
callback The function that will be called once the widget has been created. *Note that when the function is called, the this keyword refers to the instance of the widget.

App.addBehavior

Add a behavior to a DOM element.

object App.addBehavior(id,type, args, callback)
Argument Description
id The unique identity of the element to be retrieved.
type The behavior type to assign to the element.
args Initial attributes that will be passed into the build function of the behavior.
callback The function that will be called once the behavior has been applied. *Note that when the function is called, the this keyword refers to the instance of the behavior.

App.getBehavior

Get an instance of a behavior that is already declared.

void App.getBehavior(id,type,callback)
Argument Description
id The unique identity of the control to be retrieved.
type The behavior type that is to be retrieved.
callback The function that will be called the behavior has been assigned. *Note that when the function is called, the this keyword refers to the instance of the behavior.

jQuery.fn.addBehavior

Add a behavior to an existing DOM element.

object jQuery.fn.addBehavior(type,args,callback)
Argument Description
type The behavior type to assign to the element.
args Initial attributes that will be passed into the build function of the behavior.
callback The function that will be called once the behavior has been applied. *Note that when the function is called, the this keyword refers to the instance of the behavior.

App.registerListener

Register UI Event Listeners to a behavior or widget.

void App.registerListener(id,type,name,event,callback)
Argument Description
id The unique identity of the widget to be retrieved.
type The behavior or widget type that will receive the listener.
name The name of the message to listen for
event The event to assign, such as “click”, “blur” or “change”.
callback The function that will be called once the listener has been applied. *Note that when the function is called, the this keyword refers to the element.