inputEx Documentation Back to homepage

### inputEx Documentation > inputEx.AutoComplete 0.2.2

## Static Class inputEx.AutoComplete - extends inputEx.StringField

An autocomplete field that wraps the YUI autocompleter

Known Subclasses:
  inputEx.MultiAutoComplete

### Constructor

inputEx.AutoComplete `( options )`

Parameters:
  `options <Object>` - Added options for Autocompleter
  - datasource: the datasource
  - autoComp: autocompleter options
  - returnValue: function to format the returned value (optional)

### Methods

#### buildAutocomplete

`buildAutocomplete()`
Build the YUI autocompleter

#### getValue

`getValue()`
Return the hidden value (stored in a hidden input)

#### initEvents

`initEvents()`
Custom event init

- listen to autocompleter textboxBlurEvent instead of this.el "blur" event
- listener to autocompleter textboxBlurEvent added in buildAutocomplete method

#### itemSelectHandler

`itemSelectHandler(sType,aArgs)`
itemSelect handler
Parameters:

`sType`

`aArgs`

#### onChange

`onChange(e)`
onChange event handler
Parameters:

`e <Event>` - The original 'change' event

#### renderComponent

`renderComponent()`
Render the hidden list element

#### setOptions

`setOptions(options)`
Adds autocomplete options
Parameters:

`options <Object>` - Options object (inputEx inputParams) as passed to the constructor

#### setValue

`setValue(value[,sendUpdatedEvt])`
Set the value
Parameters:

`value <Any>` - Value to set

`sendUpdatedEvt <boolean>` optional - (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

#### Methods inherited from class inputEx.StringField:

`updateTypeInvite, disable, enable, validate, onFocus, focus, onKeyUp, onKeyPress, setClassFromState, getStateString,`

Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:30 GMT using neyricjslibs-template.