The ControlFramework
interface specifies those lifecycle functions that are necessary for a control
implementation to be managed by the Control Framework.
Methods
attach Control Event Listener(event Name, 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:ct-element |
The renderer |
bind(control Element, is Dummyopt)
Binds the DOM control.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
controlElement |
Html |
The DOM element which represents the control. |
|
isDummy |
boolean |
<optional> |
|
create Html(value) → {HTMLElement|DocumentFr agment}
Creates an HTML fragment using the supplied control value.
Parameters:
Name | Type | Description |
---|---|---|
value |
Variant | The field vale to display. |
Returns:
The HTML element or document fragment
- Type
-
HTMLElement
|
Document
Fragment
detach Control Event Listener(event Name)
Detaches event listeners from the control.
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String | The event name such as 'click', 'change', 'mouseover' etc. |
finalize()
Releases any resources and unbinds the control from the DOM.
get Initial Class Name() → {String}
Gets the initial class name.
Returns:
The initial class name.
- Type
- String
initialize()
Initializes the control, clearing any cached value and cached CSS styling information.
set Initial Class Name(initial Class Name)
Sets the initial class name.
Parameters:
Name | Type | Description |
---|---|---|
initialClassName |
String | The HTML class attribute (a space separated list). |
unbind()
Unbinds the DOM control.