# inputEx-library

### inputEx 0.5.1

inputEx-library > inputEx > inputEx.AutoComplete
Search:
Filters Show Private Show Protected Show Deprecated

## Class inputEx.AutoComplete - extends inputEx.StringField

Known Subclasses:
  inputEx.MultiAutoComplete

An autocomplete field that wraps the YUI autocompleter

### 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)

#### Properties inherited from inputEx.Field:

`options`

### Methods

#### buildAutocomplete

`void buildAutocomplete ( )`
Build the YUI autocompleter

#### getValue

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

#### initEvents

`void initEvents ( )`
Custom event init

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

#### itemSelectHandler

`void itemSelectHandler ( sType , aArgs )`
itemSelect handler

Parameters:
  `sType <object>`
  `aArgs <object>`

#### onChange

`void onChange ( e )`
onChange event handler

Parameters:
  `e <Event>` The original 'change' event

#### renderComponent

`void renderComponent ( )`
Render the hidden list element

#### setOptions

`void setOptions ( options )`
Adds autocomplete options

Parameters:
  `options <Object>` Options object as passed to the constructor

#### setValue

`void setValue ( value , [sendUpdatedEvt] )`
Set the value

Parameters:
  `value <Any>` Value to set
  `[sendUpdatedEvt] <boolean>` (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

#### Methods inherited from inputEx.Field:

`clear, close, destroy, disable, displayMessage, enable, fireUpdatedEvt, focus, getEl, getParentField, getState, getStateString, getValue, hide, initEvents, isDisabled, isEmpty, onBlur, onChange, onFocus, render, renderComponent, setClassFromState, setFieldName, setOptions, setParentField, setValue, show, validate`

#### Methods inherited from inputEx.StringField:

`disable, enable, focus, getStateString, getValue, initEvents, isDisabled, onFocus, renderComponent, setClassFromState, setFieldName, setOptions, setValue, validate`

#### Events inherited from inputEx.Field:

`updatedEvt,`

Copyright © 2010 Eric Abouaf All rights reserved.