Caplin Trader 4.8.0

Class: module:br/presenter/control/selectionfield/JQueryAutoCompleteControl

module:br/presenter/control/selectionfield/JQueryAutoCompleteControl

Provides an input box that supports auto complete when used in conjunction with a module:br/presenter/node/AutoCompleteSelectionField.

The jQuery auto complete control is aliased by br.autocomplete-box, and can be used within templates as follows:

  <span data-bind="controlNode:autoCompleteSelectionFieldProperty, control:'br.autocomplete-box'"></span>

You can also use an exsisting text input element and avoid having an extra container element around the control:

  <input type="text" data-bind="controlNode:autoCompleteSelectionFieldProperty, control:'br.autocomplete-box'"/>

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. minCharAmount - Specify the minimun amount of characters to be typed before the autocomplete menu is displayed. Default is 0.

Constructor

new module:br/presenter/control/selectionfield/JQueryAutoCompleteControl()

Extends:
See:
  • br.presenter.node.AutoCompleteSelectionField

Extends

Methods

destroy()

Destroy created listeners and jQuery autocomplete plugin

onPropertyChanged()

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:

onPropertyUpdated()

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:

onValidationComplete()

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.

Inherited From:

onValidationError(vPropertyValue, sErrorMessage)

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:

onValidationSuccess()

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.

Inherited From:

onViewReady()

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: