new module:ct-presenter /control /selectionfield /JQuery Auto Complete Control Adapter()
Provides an input box that supports auto complete when used in conjunction with a
module:br-presenter/node/AutoCompleteSelectionField
. Use
jquery-autocomplete-box
as the control attribute.
Options: openOnFocus - Show the auto complete selection on input focus (true|false). Defaults to false. appendTo - Specify the jquery selector of the element that the menu should be appended to.
Extends:
- Deprecated:
- This class has been deprecated. Please use
module:br-presenter/control/selectionfield/JQueryAutoCompleteControl
instead.
- This class has been deprecated. Please use
- See:
Extends
Methods
destroy()
Called when the view is being disposed of to allow cleaning up of listeners and controls.
- Inherited From:
on Property Changed()
Callback method invoked when the value of a module:br-presenter/property/Property
changes.
Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.
- Inherited From:
on Property Updated()
Callback method invoked when the value of a module:br-presenter/property/Property
is updated, even when it hasn't changed.
This event is there to accommodate cases where we want to know about calls to set the value of a property even if the new value being set is the same as the old one.
Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.
- Inherited From:
on Validation Complete()
Callback method invoked once validation is complete.
Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.
on Validation Error(vProperty Value, sError Message)
Callback method invoked when an attempt to update an module:br-presenter/property/EditableProperty
results in a validation error.
Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.
Parameters:
Name | Type | Description |
---|---|---|
vPropertyValue |
Object | The value that led to the validation error. |
sErrorMessage |
String | The description of the validation error. |
- Inherited From:
on Validation Success()
Callback method invoked when an attempt to update an module:br-presenter/property/EditableProperty
does not result in a validation error.
Implementation of this method is optional, and no action will be taken if the method is invoked but has not been overridden.
on View Ready()
Called after the view is rendered to screen.
Controls that need to perform some additional work once the element they are contained within
has been added to the document (via #getElement
), can do so within this call-back.
- Inherited From:
set Element(eElement)
Sets the element in which the control will be rendered in.
Parameters:
Name | Type | Description |
---|---|---|
eElement |
Element | DOM element to use as the container for the control. Some controls will use this element as the actual control (progressive enhancement). |
- Inherited From:
set Options(mOptions)
Sets the configuration options of the control.
Control configuration options passed within the HTML template are made available using this method. Control options can be passed within the HTML template like this:
<div id="dropDownSelectBox" data-bind="controlNode:selectionField, control:'ext-select-box', controlOptions:{width:95}"> </div>
Parameters:
Name | Type | Description |
---|---|---|
mOptions |
Object | A map of options |
- Inherited From:
set Presentation Node(oPresentation Node)
Sets the presentation node the control is being bound to.
It is the control adaptors responsibility to synchronize the presentation node with the control being adapted; any changes to the presentation node properties must be reflected in the control, and any user interactions with the control must be reflected in the presentation node.
Each control adaptor will typically be designed to work with a single type of presentation node, for example:
module:br-presenter/node/Button
module:br-presenter/node/Field
module:br-presenter/node/SelectionField
module:br-presenter/node/MultiSelectionField
Authors are encouraged specify the presentation node type the control adaptor accepts within the
package name (e.g.
br-presenter/control/selectionfield/JQueryAutoCompleteControl
), and to fail
fast by throwing a module:br-presenter/control/InvalidControlModelError
if they are bound
to the wrong type of presentation node.
Parameters:
Name | Type | Description |
---|---|---|
oPresentationNode |
module:br-presenter |
The presentation node the control is being bound to. |
- Inherited From:
Throws:
-
if the wrong type of presentation node is used.
- Type
-
br-presenter
/control /Invalid Control Model Error