Caplin Trader 4.7.1

Interface: module:caplin/control/factory/ControlFramework

module: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.
Implementations:

Methods

attachControlEventListener(eventName, 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:
Name Type Description
eventName String The event name such as 'click', 'change', 'mouseover' etc.
renderer module:caplin/element/Renderer The renderer
Implementations:

bind(controlElement, isDummyopt)

Binds the DOM control.
Parameters:
Name Type Attributes Description
controlElement HtmlElement The DOM element which represents the control.
isDummy boolean <optional>
true if the supplied control is a dummy.
Implementations:

createHtml(value) → {String}

Creates an HTML fragment using the supplied control value.
Parameters:
Name Type Description
value Variant The field vale to display.
Returns:
The HTML fragment
Type
String

detachControlEventListener(eventName)

Detaches event listeners from the control.
Parameters:
Name Type Description
eventName String The event name such as 'click', 'change', 'mouseover' etc.
Implementations:

finalize()

Releases any resources and unbinds the control from the DOM.
Implementations:

getInitialClassName() → {String}

Gets the initial class name.
Implementations:
Returns:
The initial class name.
Type
String

initialize()

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

setInitialClassName(initialClassName)

Sets the initial class name.
Parameters:
Name Type Description
initialClassName String The HTML class attribute (a space separated list).
Implementations:

unbind()

Unbinds the DOM control.
Implementations: