Packagecom.hillelcoren.components
Classpublic class AutoComplete
InheritanceAutoComplete Inheritance mx.containers.Grid
Implementsmx.controls.listClasses.IDropInListItemRenderer, mx.managers.IFocusManagerComponent



Public Properties
 PropertyDefined by
  allowDuplicates : Boolean
[write-only] A flag that indicates whether or not you can select duplicate items when multiselect mode is enabled
AutoComplete
  allowEditingNewValues : Boolean
[write-only] A flag that indicates whether or not you can edit a new item which has been added.
AutoComplete
  allowMultipleSelection : Boolean
[write-only] Flag which sets whether or not we allow the user to select more than one item
AutoComplete
  allowNewValues : Boolean
[write-only] A flag that indicates whether or not you can select values which aren't in the dataProvider
AutoComplete
  autoSelectEnabled : Boolean
[write-only] A flag which indicates whether or not we'll automatically select the value if either (a) there's only one match and it's equal to the text or (b) matches the custom autoSelectEnabled
AutoComplete
  autoSelectFunction : Function
[write-only] A function which controls whether or not to automatically select the item if it's the only match.
AutoComplete
  backspaceAction : String
[write-only] The action to take when pressing backspace when the cursor is in front of a selected item.
AutoComplete
  data : Object
[write-only]
AutoComplete
  dataProvider : ArrayCollection
AutoComplete
  dropDown : List
[read-only]
AutoComplete
  dropDownItemRenderer : IFactory
[write-only] The custom item renderer for the dropdown displayed when searching.
AutoComplete
  dropDownLabelFunction : Function
[write-only]
AutoComplete
  dropDownRowCount : uint
[write-only] The number of rows to show in the dropDown which appears when searching
AutoComplete
  dropDownWidth : int
[write-only]
AutoComplete
  enableClearIcon : Boolean
[write-only]
AutoComplete
  errorString : String
AutoComplete
  filterFunction : Function
[write-only] A function that the view will use to eliminate items that do not match the function's criteria.
AutoComplete
  inlineButton : Button
AutoComplete
  keyField : String
[write-only] This field is used in conjuction with the selectedItems or selectedItemId property to determine if the item matches.
AutoComplete
  labelField : String
[write-only] The name of the field in the data provider items to display as the label.
AutoComplete
  labelFunction : Function
AutoComplete
  listData : BaseListData
AutoComplete
  matchType : String
AutoComplete
  prompt : String
[write-only] The prompt to display before the component receives focus
AutoComplete
  searchText : String
Returns the search string.
AutoComplete
  selectedItem : *
AutoComplete
  selectedItemId : Number
[write-only] The id of the initially selected item.
AutoComplete
  selectedItems : ArrayCollection
AutoComplete
  showRemoveIcon : Boolean
[write-only] A flag that indicates whether or not to display the remove icon in the selected items.
AutoComplete
  text : String
AutoComplete
  textInput : PromptTextInput
[read-only]
AutoComplete
Protected Properties
 PropertyDefined by
  _1763739238_dataProvider : ArrayCollection
AutoComplete
  _652820454_selectedItems : ArrayCollection
AutoComplete
  _allowMultipleSelection : Boolean
AutoComplete
  _filterFunction : Function
AutoComplete
  _inlineButton : Button
AutoComplete
  _labelField : String
AutoComplete
  _labelFunction : Function
AutoComplete
  _selectedItemId : Number
AutoComplete
  _showSelectedItems : Boolean = true
AutoComplete
Public Methods
 MethodDefined by
  
addItem(item:Object):void
AutoComplete
  
defaultDropDownLabelFunction(item:Object):String
The default function used to determine the text to display in the dropdown when searching.
AutoComplete
  
filterData():void
AutoComplete
  
handleChange(event:Event):void
AutoComplete
  
hideDropDown():void
AutoComplete
  
isItemSelected(item:Object):Boolean
AutoComplete
  
isSettingValue():Boolean
Checks if the component is in the process of resolving the selecteItemId to it's respective object.
AutoComplete
  
AutoComplete
  
removeAll():void
AutoComplete
  
removeItemAt(index:int):void
AutoComplete
  
search():void
This will cause the component to research the dataProvider and display the popUp if there are any matches.
AutoComplete
  
setFocus():void
AutoComplete
  
showDropDown():void
AutoComplete
Protected Methods
 MethodDefined by
  
AutoComplete
Events
 EventSummaryDefined by
   Dispatched when the selected items are changed by the user AutoComplete
   Dispatched when the text in the search field is changed AutoComplete
   Dispatched when the selected items are changed either by the user or programmitcally AutoComplete
Styles
 StyleDescriptionDefined by
  
promptColor
Type: uint   Format: Color   CSS Inheritance: yes
The color for the prompt shown when no value is set
AutoComplete
  
selectedItemStyleName
Type: String   CSS Inheritance: yes
The style/skin for the selected item
AutoComplete
Public Constants
 ConstantDefined by
  BACKSPACE_FOCUS : String = "focus"
[static]
AutoComplete
  BACKSPACE_REMOVE : String = "remove"
[static]
AutoComplete
  LAYOUT_HORIZONTAL : String = "horizontal"
[static]
AutoComplete
  LAYOUT_VERTICAL : String = "vertical"
[static]
AutoComplete
  MATCH_ANY_PART : String = "anyPart"
[static]
AutoComplete
  MATCH_BEGINNING : String = "beginning"
[static]
AutoComplete
  MATCH_WORD : String = "word"
[static]
AutoComplete
  SEARCH_CHANGE : String = "searchChange"
[static]
AutoComplete
  STYLE_FACEBOOK : String = "facebook"
[static]
AutoComplete
  STYLE_MAC_MAIL : String = "macMail"
[static]
AutoComplete
  STYLE_UNDERLINE : String = "underline"
[static]
AutoComplete
Property detail
_1763739238_dataProviderproperty
protected var _1763739238_dataProvider:ArrayCollection
_652820454_selectedItemsproperty 
protected var _652820454_selectedItems:ArrayCollection
allowDuplicatesproperty 
allowDuplicates:Boolean  [write-only]

A flag that indicates whether or not you can select duplicate items when multiselect mode is enabled

The default value is false.

Implementation
    public function set allowDuplicates(value:Boolean):void
allowEditingNewValuesproperty 
allowEditingNewValues:Boolean  [write-only]

A flag that indicates whether or not you can edit a new item which has been added. This only affects the component when allowNewValues is set to false

Implementation
    public function set allowEditingNewValues(value:Boolean):void
_allowMultipleSelectionproperty 
protected var _allowMultipleSelection:Boolean
allowMultipleSelectionproperty 
allowMultipleSelection:Boolean  [write-only]

Flag which sets whether or not we allow the user to select more than one item

Implementation
    public function set allowMultipleSelection(value:Boolean):void
allowNewValuesproperty 
allowNewValues:Boolean  [write-only]

A flag that indicates whether or not you can select values which aren't in the dataProvider

The default value is true.

Implementation
    public function set allowNewValues(value:Boolean):void
autoSelectEnabledproperty 
autoSelectEnabled:Boolean  [write-only]

A flag which indicates whether or not we'll automatically select the value if either (a) there's only one match and it's equal to the text or (b) matches the custom autoSelectEnabled

Implementation
    public function set autoSelectEnabled(value:Boolean):void
autoSelectFunctionproperty 
autoSelectFunction:Function  [write-only]

A function which controls whether or not to automatically select the item if it's the only match. Note, this functionality is disabled if autoSelect is set to false.

Implementation
    public function set autoSelectFunction(value:Function):void
backspaceActionproperty 
backspaceAction:String  [write-only]

The action to take when pressing backspace when the cursor is in front of a selected item.

The default value is focus.

Implementation
    public function set backspaceAction(value:String):void
dataproperty 
data:Object  [write-only]Implementation
    public function set data(value:Object):void
dataProviderproperty 
dataProvider:ArrayCollection  [read-write]Implementation
    public function get dataProvider():ArrayCollection
    public function set dataProvider(value:ArrayCollection):void
dropDownproperty 
dropDown:List  [read-only]Implementation
    public function get dropDown():List
dropDownItemRendererproperty 
dropDownItemRenderer:IFactory  [write-only]

The custom item renderer for the dropdown displayed when searching.

Implementation
    public function set dropDownItemRenderer(value:IFactory):void
dropDownLabelFunctionproperty 
dropDownLabelFunction:Function  [write-only]Implementation
    public function set dropDownLabelFunction(value:Function):void
dropDownRowCountproperty 
dropDownRowCount:uint  [write-only]

The number of rows to show in the dropDown which appears when searching

Implementation
    public function set dropDownRowCount(value:uint):void
dropDownWidthproperty 
dropDownWidth:int  [write-only]Implementation
    public function set dropDownWidth(value:int):void
enableClearIconproperty 
enableClearIcon:Boolean  [write-only]Implementation
    public function set enableClearIcon(value:Boolean):void
errorStringproperty 
errorString:String  [read-write]Implementation
    public function get errorString():String
    public function set errorString(value:String):void
_filterFunctionproperty 
protected var _filterFunction:Function
filterFunctionproperty 
filterFunction:Function  [write-only]

A function that the view will use to eliminate items that do not match the function's criteria.

Implementation
    public function set filterFunction(value:Function):void
_inlineButtonproperty 
protected var _inlineButton:Button
inlineButtonproperty 
inlineButton:Button  [read-write]Implementation
    public function get inlineButton():Button
    public function set inlineButton(value:Button):void
keyFieldproperty 
keyField:String  [write-only]

This field is used in conjuction with the selectedItems or selectedItemId property to determine if the item matches.

The default value is id.

Implementation
    public function set keyField(value:String):void
_labelFieldproperty 
protected var _labelField:String
labelFieldproperty 
labelField:String  [write-only]

The name of the field in the data provider items to display as the label.

Implementation
    public function set labelField(value:String):void
_labelFunctionproperty 
protected var _labelFunction:Function
labelFunctionproperty 
labelFunction:Function  [read-write]Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void
listDataproperty 
listData:BaseListData  [read-write]Implementation
    public function get listData():BaseListData
    public function set listData(value:BaseListData):void
matchTypeproperty 
matchType:String  [read-write]Implementation
    public function get matchType():String
    public function set matchType(value:String):void
promptproperty 
prompt:String  [write-only]

The prompt to display before the component receives focus

Implementation
    public function set prompt(value:String):void
searchTextproperty 
searchText:String  [read-write]

Returns the search string.

This property can be used as the source for data binding.

Implementation
    public function get searchText():String
    public function set searchText(value:String):void
selectedItemproperty 
selectedItem:*  [read-write]

This property can be used as the source for data binding.

Implementation
    public function get selectedItem():*
    public function set selectedItem(value:*):void
_selectedItemIdproperty 
protected var _selectedItemId:Number
selectedItemIdproperty 
selectedItemId:Number  [write-only]

The id of the initially selected item.

Implementation
    public function set selectedItemId(value:Number):void
selectedItemsproperty 
selectedItems:ArrayCollection  [read-write]

This property can be used as the source for data binding.

Implementation
    public function get selectedItems():ArrayCollection
    public function set selectedItems(value:ArrayCollection):void
showRemoveIconproperty 
showRemoveIcon:Boolean  [write-only]

A flag that indicates whether or not to display the remove icon in the selected items.

The default value is false.

Implementation
    public function set showRemoveIcon(value:Boolean):void
_showSelectedItemsproperty 
protected var _showSelectedItems:Boolean = true
textproperty 
text:String  [read-write]

This property can be used as the source for data binding.

Implementation
    public function get text():String
    public function set text(value:String):void
textInputproperty 
textInput:PromptTextInput  [read-only]Implementation
    public function get textInput():PromptTextInput
Method detail
addItem()method
public function addItem(item:Object):voidParameters
item:Object
commitProperties()method 
protected override function commitProperties():void
defaultDropDownLabelFunction()method 
public function defaultDropDownLabelFunction(item:Object):String

The default function used to determine the text to display in the dropdown when searching. It will try to find the part of the item which matched the search string and highlight it by making bold and underlined

Parameters
item:Object

Returns
String
filterData()method 
public function filterData():void
handleChange()method 
public function handleChange(event:Event):voidParameters
event:Event
hideDropDown()method 
public function hideDropDown():void
isItemSelected()method 
public function isItemSelected(item:Object):BooleanParameters
item:Object

Returns
Boolean
isSettingValue()method 
public function isSettingValue():Boolean

Checks if the component is in the process of resolving the selecteItemId to it's respective object.

Returns
Boolean
positionDropDown()method 
public function positionDropDown():void
removeAll()method 
public function removeAll():void
removeItemAt()method 
public function removeItemAt(index:int):voidParameters
index:int
search()method 
public function search():void

This will cause the component to research the dataProvider and display the popUp if there are any matches. This is useful when using a dynamic dataProvider. Simply call this function once the data has been returned from the server

setFocus()method 
public override function setFocus():void
showDropDown()method 
public function showDropDown():void
Event detail
changeevent 

Dispatched when the selected items are changed by the user

searchChangeevent  

Dispatched when the text in the search field is changed

valueCommitevent  

Dispatched when the selected items are changed either by the user or programmitcally

Constant detail
BACKSPACE_FOCUSconstant
public static const BACKSPACE_FOCUS:String = "focus"
BACKSPACE_REMOVEconstant 
public static const BACKSPACE_REMOVE:String = "remove"
LAYOUT_HORIZONTALconstant 
public static const LAYOUT_HORIZONTAL:String = "horizontal"
LAYOUT_VERTICALconstant 
public static const LAYOUT_VERTICAL:String = "vertical"
MATCH_ANY_PARTconstant 
public static const MATCH_ANY_PART:String = "anyPart"
MATCH_BEGINNINGconstant 
public static const MATCH_BEGINNING:String = "beginning"
MATCH_WORDconstant 
public static const MATCH_WORD:String = "word"
SEARCH_CHANGEconstant 
public static const SEARCH_CHANGE:String = "searchChange"
STYLE_FACEBOOKconstant 
public static const STYLE_FACEBOOK:String = "facebook"
STYLE_MAC_MAILconstant 
public static const STYLE_MAC_MAIL:String = "macMail"
STYLE_UNDERLINEconstant 
public static const STYLE_UNDERLINE:String = "underline"