Interface
caplin.control.factory

ControlFramework

The ControlFramework interface specifies those lifecycle functions that are necessary for a control implementation to be managed by the Control Framework.

Constructor Summary

Attributes Name and Description
caplin.control.factory.ControlFramework()

Method Summary

Attributes Name and Description
void attachControlEventListener(String eventName, caplin.element.Renderer renderer)

Attaches an event listener to the control.

void bind(HtmlElement controlElement, boolean isDummy)

Binds the DOM control.

String createHtml(Variant value)

Creates an HTML fragment using the supplied control value.

void detachControlEventListener(String eventName)

Detaches event listeners from the control.

void finalize()

Releases any resources and unbinds the control from the DOM.

String getInitialClassName()

Gets the initial class name.

void initialize()

Initializes the control, clearing any cached value and cached CSS styling information.

void setInitialClassName(String initialClassName)

Sets the initial class name.

void unbind()

Unbinds the DOM control.

Constructor Detail

caplin.control.factory.ControlFramework()

Method Detail

void attachControlEventListener(String eventName, caplin.element.Renderer renderer)

Attaches an event listener to the control. When the event occurs on the control then the onRendererEvent callback will be invoked on the supplied renderer.

Parameters
String eventName The event name such as 'click', 'change', 'mouseover' etc.
caplin.element.Renderer renderer The renderer

void bind(HtmlElement controlElement, boolean isDummy)

Binds the DOM control.

Parameters
HtmlElement controlElement The DOM element which represents the control.
boolean isDummy (optional) True if the supplied control is a dummy.

String createHtml(Variant value)

Creates an HTML fragment using the supplied control value.

Parameters
Variant value The field vale to display.
Returns
{String} The HTML fragment

void detachControlEventListener(String eventName)

Detaches event listeners from the control.

Parameters
String eventName The event name such as 'click', 'change', 'mouseover' etc.

void finalize()

Releases any resources and unbinds the control from the DOM.

String getInitialClassName()

Gets the initial class name.

Returns
{String} The initial class name.

void initialize()

Initializes the control, clearing any cached value and cached CSS styling information.

void setInitialClassName(String initialClassName)

Sets the initial class name.

Parameters
String initialClassName The HTML class attribute (a space separated list).

void unbind()

Unbinds the DOM control.