AutoSuggestControl
A templated, model-based autosuggest textbox.
- Object
- SitedObject
- Control
- ContainerControl
- AutoSuggestControl
Remarks
This control supports specifying the appearance of suggestions in the drop down list, as well as multiple entered values, using a text delimiter to separate the textual representation of the values in the textbox.
The model of an AutoSuggest control is a SitedList of objects (which in the simplest case may simply be strings). These objects must implement to the toString() method, which is used to compare against the text entered into the text area. The result of an AutoSuggest may either be the text that the user has entered, or the object (or list of objects) that matches the text that is entered.
Properties
ID_animators (inherited from Control) | A SitedList of animators. |
ID_childControls (inherited from ContainerControl) | A SitedList of child controls. |
ID_controlId (inherited from Control) | The ID this control is known in the nearest binding container parent. |
ID_eventMask (inherited from Control) | (Advanced) A comma-separated list of peer events this control should receive. |
ID_isBindingContainer (inherited from Control) | (Advanced) Force this control to act as a binding container. |
ID_isPeerless (inherited from Control) | (Advanced) Set this to true to prevent this control from generating a peer element in the rendered HTML. |
ID_matchFunction | |
ID_maxVisibleSuggestions | |
ID_multipleValues | |
ID_objectToTextFunction | |
ID_separators | |
ID_submitters (inherited from Control) | A SitedList of submitters. |
ID_suggestions | |
ID_suggestionTemplate | |
ID_tagName (inherited from Control) | Overrides the default HTML tag name used for this control. |
ID_text | |
ID_textToObjectFunction | |
ID_value | |
ID_values | |
ID_visible (inherited from Control) | True if this control is visible, false if it is hidden. |
Events
ID_mouseDown (inherited from Control) | Event handler called when a mouse button is pressed down. |
ID_mouseMove (inherited from Control) | Event handler called when the mouse is moved. |
ID_mouseOut (inherited from Control) | Event handler called when a leaves a control. |
ID_mouseOver (inherited from Control) | Event handler called when a mouse moves over a control. |
ID_mouseUp (inherited from Control) | Event handler called when a mouse button is released. |
Methods
acceptsDrop (inherited from Control) | Called to determine if this control will accept a drop. |
addBinding (inherited from Control) | Adds a databinding between a property on this object and a binding path. |
addBindingEx (inherited from Control) | Extended entry point for adding a binding. |
addCalculatedBinding (inherited from Control) | Adds a calculated binding for a property. |
addChild (inherited from ContainerControl) | Add a child control to this ContainerControl. |
addClassName (inherited from Control) | Adds a CSS class to this controls "class" attribute |
addEventHandler (inherited from SitedObject) | Adds a delegate to be called when the specified eventId occurs on this object. |
animateEx (inherited from Control) | Animates a property to a value. |
blur (inherited from Control) | Tells this control's peer to relinquish keyboard focus. |
bubble (inherited from Control) | Bubbles a message up the control hierarchy - calls onBubbleEvent on this control and each of its parents. |
captureMouse (inherited from Control) | Register a control to receive mouse move/up events |
construct (inherited from Control) | Used to initialize a markup control. |
equals (inherited from SitedObject) | Tests if two objects are equal. |
fireEventHandler (inherited from SitedObject) | Invokes any user event handlers registered for a particular event using SitedObject.addEventHandler(). |
focus (inherited from Control) | Tells this control's peer to request keyboard focus. |
getBindingContainer (inherited from Control) | Gets this object's nearest enclosing binding container. |
getBindingStatus (inherited from SitedObject) | Provides debugging information on bindings for this object. |
getChild (inherited from ContainerControl) | Gets the n'th child |
getEventMask (inherited from Control) | Gets an object indicating which peer events this control is interested in. |
getParent (inherited from Control) | Gets the parent Control of this control. |
getPathValue (inherited from SitedObject) | Traverses a binding path and returns the value at the end of it. |
getPeer (inherited from Control) | Gets the peer DOM element associated with this control. |
getPeerForParent (inherited from Control) | Gets the peer element of this control that the parent control should use in DOM manipulations. |
getPropertyInfo (inherited from SitedObject) | Gets information on a property. |
getResource (inherited from Control) | Given the ID of a resource, returns the resource's value. |
getSite (inherited from SitedObject) | Gets this object's site. |
getTagName (inherited from ContainerControl) | Gets the HTML tag name this control will use for its peer element. |
getTextBox | Get the textbox control we use to present the text. |
getValue (inherited from Control) | Gets a property, style or attribute. |
getViewState (inherited from Control) | Retrieve any viewstate that has been saved for this control in a previous session. |
getViewStateId (inherited from Control) | Get a unique and consistent viewstateId for this control. |
invalidateLayout (inherited from Control) | Tells the layout system to redo layout. |
modifyDOM (inherited from ContainerControl) | Called to manipulate the DOM peer node of this control. |
onBubbleEvent (inherited from Control) | Called to handle a bubbled event. |
onDragEvent (inherited from Control) | Called to handle a drag drop event.. |
onFirstRender (inherited from Control) | Called the first time a control is rendered. |
onPeerCreated (inherited from Control) | Called when a peer is created. |
onPeerEvent (inherited from Control) | Called to dispatch low level events that arise in the Dom. |
onSetValue (inherited from ContainerControl) | Called by SitedObject.setValue() when a property value is set on this object. |
onSited (inherited from SitedObject) | Called when this object is sited. |
onSitedRoot (inherited from Control) | Called when a control is added to the main control tree. |
onUnsited (inherited from SitedObject) | Called when this object is about to lose its site. |
onUnsitedRoot (inherited from Control) | Called when a control is removed from the main control tree. |
onValueSited (inherited from ContainerControl) | Called when an object is sited within this object. |
onValueUnsited (inherited from ContainerControl) | Called when an object is about to be unsited in this. |
onViewStateChanged (inherited from Control) | Overridable. Controls implement this method to update their viewstate. |
rebuildInnerHtml (inherited from ContainerControl) | Updates this controls innerHTML. |
reflectOnBoundValue (inherited from Control) | Gets runtime reflection information on an underlying bound object. |
removeChild (inherited from ContainerControl) | Remove a child control from this ContainerControl. |
removeClassName (inherited from Control) | Removes a CSS class from this controls "class" attribute |
removeEventHandler (inherited from SitedObject) | Remove an existing delegate from the list of delegates for the specified event. |
render (inherited from Control) | Places the Html representation of this control into the htmlBuilder. |
renderAttributes (inherited from Control) | Called by Control.render() to render attributes for this control. |
renderChildren (inherited from ContainerControl) | Places the Html markup for all the Control inside this control into the htmlBuilder. |
setBounds (inherited from Control) | Convenience method to set the left/top/width/height of an element. |
setInitialValues (inherited from SitedObject) | Sets multiple property values on an object (during initialization only) |
setPathValue (inherited from SitedObject) | Traverses a binding path and sets the value at the end of it. |
setValue (inherited from Control) | Sets a property, style or attribute. |
setViewState (inherited from Control) | Save viewstate that should persist across sessions. |
startAnimator (inherited from Control) | Starts an animation. |
startDragDrop (inherited from Control) | Start a drag drop operation. |
stopAnimator (inherited from Control) | Stops an animation. |
toString (inherited from SitedObject) | Returns a string representation of this object. |
AutoSuggestControl getTextBox method
Get the textbox control we use to present the text.
JavaScript
autoSuggestControl.getTextBox()
Remarks
This can either be specified
explicitly by the user with the ID_textBox property, or created automatically. Specifying
ID_isMultiLine is true on this control will create a text area rather than a textbox.
AutoSuggestControl ID_matchFunction property
JavaScript
var strVal = autoSuggestControl.getValue(ID_matchFunction)
autoSuggestControl.setValue(ID_matchFunction, strVal)
Xml
<j:AutoSuggest matchFunction="string" ... >
AutoSuggestControl ID_maxVisibleSuggestions property
JavaScript
var intVal = autoSuggestControl.getValue(ID_maxVisibleSuggestions)
autoSuggestControl.setValue(ID_maxVisibleSuggestions, intVal)
Xml
<j:AutoSuggest maxVisibleSuggestions="int" ... >
AutoSuggestControl ID_multipleValues property
JavaScript
var boolVal = autoSuggestControl.getValue(ID_multipleValues)
autoSuggestControl.setValue(ID_multipleValues, boolVal)
Xml
<j:AutoSuggest multipleValues="true" ... >
or
<j:AutoSuggest multipleValues="false" ... >
AutoSuggestControl ID_objectToTextFunction property
JavaScript
var strVal = autoSuggestControl.getValue(ID_objectToTextFunction)
autoSuggestControl.setValue(ID_objectToTextFunction, strVal)
Xml
<j:AutoSuggest objectToTextFunction="string" ... >
AutoSuggestControl ID_separators property
JavaScript
var strVal = autoSuggestControl.getValue(ID_separators)
autoSuggestControl.setValue(ID_separators, strVal)
Xml
<j:AutoSuggest separators="string" ... >
AutoSuggestControl ID_suggestions property
JavaScript
var objectList = autoSuggestControl.getValue(ID_suggestions)
autoSuggestControl.setValue(ID_suggestions, objectList)
Xml
<j:AutoSuggest>
<j:suggestions>
<j:di type="typeName">object</j:di>
<j:di type="typeName">object</j:di>
...
<j:/suggestions>
</j:AutoSuggest>
AutoSuggestControl ID_suggestionTemplate property
JavaScript
var template = autoSuggestControl.getValue(ID_suggestionTemplate)
autoSuggestControl.setValue(ID_suggestionTemplate, template)
Xml
<j:AutoSuggest>
<j:suggestionTemplate>
Template
<j:/suggestionTemplate>
</j:AutoSuggest>
AutoSuggestControl ID_text property
JavaScript
var strVal = autoSuggestControl.getValue(ID_text)
autoSuggestControl.setValue(ID_text, strVal)
Xml
<j:AutoSuggest text="string" ... >
AutoSuggestControl ID_textToObjectFunction property
JavaScript
var strVal = autoSuggestControl.getValue(ID_textToObjectFunction)
autoSuggestControl.setValue(ID_textToObjectFunction, strVal)
Xml
<j:AutoSuggest textToObjectFunction="string" ... >
AutoSuggestControl ID_value property
JavaScript
var obj = autoSuggestControl.getValue(ID_value)
autoSuggestControl.setValue(ID_value, obj)
Xml
<j:AutoSuggest>
<j:value j:type="typeName">
object
<j:/value>
</j:AutoSuggest>
AutoSuggestControl ID_values property
JavaScript
var objectList = autoSuggestControl.getValue(ID_values)
autoSuggestControl.setValue(ID_values, objectList)
Xml
<j:AutoSuggest>
<j:values>
<j:di type="typeName">object</j:di>
<j:di type="typeName">object</j:di>
...
<j:/values>
</j:AutoSuggest>