Packagecom.flexicious.controls
Classpublic class TextInput
InheritanceTextInput Inheritance mx.controls.TextInput
Implements ITextFilterControl, ITextDataBoundControl, IDelayedChange
Subclasses NumericTextInput

A TextInput that implements ITextFilterControl (IFilterControl) and ITextDataBoundControl (IDataBoundControl) which enables it to be used within the filtering/binding infrasturcture.

See also

com.flexicious.controls.interfaces.filters.IFilterControl
com.flexicious.controls.interfaces.databindings.IDataBoundControl


Public Properties
 PropertyDefined By
  autoCompleteDataField : String
The dataField value associated with autocomplete dropdown.
TextInput
  autoCompleteItemRenderer : IFactory
Class factory for the dropdown item renderer.
TextInput
  autoCompleteLabelField : String
The labelField value associated with autocomplete dropdown.
TextInput
  autoCompleteLabelFunction : Function
The labelFunction for the autocomplete dropdown
TextInput
  autoCompleteList : AutoCompleteList
The actual autocomplete component.
TextInput
  autoCompleteMatchType : String
Type of the match to filter items.
TextInput
  autoCompleteRowCount : int
RowCount for the autocomplete dropdown.
TextInput
  autoCompleteSource : ICollectionView
The source for the autocomplete dropdown.
TextInput
  autoCompleteWidth : Number
Width of the autocomplete dropdown.
TextInput
  autoRegister : Boolean
Register with the container on creation complete
TextInput
  bindingTriggerEvent : String
The event to trigger the binding on.
TextInput
  clearTextOnIconClick : Boolean = false
If you specify an Icon Style, setting this variable to true will clear the text on icon click.
TextInput
  delayDuration : uint = 500
The amount of time (in milliseconds) to wait before dispatching the DELAY_CHANGE event.
TextInput
  enableAutoComplete : Boolean
Enables autocomplete behavior.
TextInput
  enableDelayChange : Boolean = true
TextInput
  filterComparisionType : String
This is usually automatically set, you don't have to manually set it, unless you're sending strings as Date objects.
TextInput
  filterOperation : String
The filter operation to apply to the comparison See the FilterExpression class for a list.
TextInput
  filterTriggerEvent : String
The event that the filter triggers on.
TextInput
  grid : IExtendedDataGrid
The grid that the filter belongs to - can be null if filter is used outside the grid
TextInput
  gridColumn : IDataGridFilterColumn
The grid column that the filter belongs to - can be null if filter is used outside the grid
TextInput
  idValue : String
To enable use of the text input in picker type scenarios where we display a label string in the text input, but expose a store for the ID value.
TextInput
  inputCharValidFunction : Function = null
Wire this up where you need character by character validation of entered text.
TextInput
  inputMask : String
Input mask for the text input
TextInput
  inputMaskDelimiters : String = /,(,),-
A comma seperated list of characters that should be treated as literal characters for input mask purposes.
TextInput
  inputMaskForceLength : Boolean = true
Does not allow user to add more characters than those specified by the mask.
TextInput
  rendererStyleName : String
TextInput
  searchField : String
The field to search on, usually same as the data field.
TextInput
  showIconWhenHasText : Boolean
Flag to control whether the icon only shows up when there is text in the box
TextInput
  watermark : String
The watermark to show when there is no text entered into the text input.
TextInput
Protected Properties
 PropertyDefined By
  _filterControlInterface : FilterControlImpl
TextInput
Public Methods
 MethodDefined By
  
Applies the selected item from the list to the autocomplete textbox
TextInput
  
clear():void
TextInput
  
Destroys the autocomplete list.
TextInput
  
dispatchEvent(event:Event):Boolean
[override]
TextInput
  
getValue():Object
Generic function that returns the value of a IFilterControl.
TextInput
  
TextInput
  
setStyle(styleProp:String, newValue:*):void
[override]
TextInput
  
If you set the inputMask after creation complete, call this function.
TextInput
  
setValue(val:Object):void
Generic function that sets the value of a IFilterControl
TextInput
Protected Methods
 MethodDefined By
  
adjustFocusRect(obj:DisplayObject = null):void
[override]
TextInput
  
applyText(newText:String):void
TextInput
  
[override]
TextInput
  
filterAutoCompete(item:*):Boolean
Based on the autoCompleteMatchType, filter the autocomplete dataprovider that
TextInput
  
TextInput
  
keyDownHandler(event:KeyboardEvent):void
[override] If the mouse is clicked up, and we dont own the target, kill autocomplete.
TextInput
  
onAutoCompleteItemClick(event:Event):void
Apply the list item value.
TextInput
  
If the mouse is clicked up, and we dont own the target, kill autocomplete.
TextInput
  
onDelayedChange(evt:Event):void
On delayed change, trigger autocomplete
TextInput
  
onInsideIcon(evt:Event):void
When icon is enabled, handles the click event of the icon.
TextInput
  
onKeyDown(event:KeyboardEvent):void
TextInput
  
onOutsideIcon(evt:Event):void
When icon is enabled, handles the click event of the icon.
TextInput
  
onRemovedFromStage(event:Event):void
If autocompete it shown, destroy it.
TextInput
  
onTextInput(event:TextEvent):void
TextInput
  
setIconVisible(event:Event):void
TextInput
  
setMask(userInput:String, advanceCursor:Boolean = false):void
On basis of the current text, sets the value of the mask.
TextInput
Events
 Event Summary Defined By
  When there are multiple change events dispatched within a short time frame, you can listen to this event instead, which will only dispatch once after waiting for a period specified by the delayDuration property, regardless of how many times the change event has dispatched.TextInput
  Dispatched when the user clicks on a the icon specified by the insideIcon propertyTextInput
  Dispatched when the user clicks on a the icon specified by the outsideIcon propertyTextInput
Styles
 Style Description Defined By
  
autoCompleteStyleName
Type: String
Stylename for the autocomplete dropdown
TextInput
  
iconGap
Type: Number CSS Inheritance: no
The spacing between insideIcon, outsideIcon, and the text input
TextInput
  
insideIcon
Type: Class CSS Inheritance: no
The icon that is displayed inside the textbox, based on the insideIconPosition property.
TextInput
  
insideIconPosition
Type: String
The position of the icon that is displayed inside the textbox. Default 'right'
TextInput
  
outsideIcon
Type: Class CSS Inheritance: no
The icon that is displayed outside the textbox, based on the outsideIconPosition property.
TextInput
  
outsideIconPosition
Type: String
The position of the icon that is displayed outside the textbox. Default 'right'
TextInput
  
watermarkStyleName
Type: String
Stylename for the watermark label
TextInput
Public Constants
 ConstantDefined By
  AUTO_COMPLETE_MATCH_TYPE_BEGINS_WITH : String = BeginsWith
[static] Match all items in the autocomplete dataprovider that start with the value of the text property
TextInput
  AUTO_COMPLETE_MATCH_TYPE_CONTAINS : String = Contains
[static] Match all items in the autocomplete dataprovider that contain the value of the text property
TextInput
  AUTO_COMPLETE_MATCH_TYPE_ENDS_WITH : String = EndsWith
[static] Match all items in the autocomplete dataprovider that end with the value of the text property
TextInput
  INSIDE_ICON_CLICK : String = insideIconClick
[static]
TextInput
  OUTSIDE_ICON_CLICK : String = outsideIconClick
[static]
TextInput
Property Detail
_filterControlInterfaceproperty
protected var _filterControlInterface:FilterControlImpl

autoCompleteDataFieldproperty 
autoCompleteDataField:String

The dataField value associated with autocomplete dropdown.


Implementation
    public function get autoCompleteDataField():String
    public function set autoCompleteDataField(value:String):void
autoCompleteItemRendererproperty 
autoCompleteItemRenderer:IFactory

Class factory for the dropdown item renderer.


Implementation
    public function get autoCompleteItemRenderer():IFactory
    public function set autoCompleteItemRenderer(value:IFactory):void
autoCompleteLabelFieldproperty 
autoCompleteLabelField:String

The labelField value associated with autocomplete dropdown.


Implementation
    public function get autoCompleteLabelField():String
    public function set autoCompleteLabelField(value:String):void
autoCompleteLabelFunctionproperty 
autoCompleteLabelFunction:Function

The labelFunction for the autocomplete dropdown


Implementation
    public function get autoCompleteLabelFunction():Function
    public function set autoCompleteLabelFunction(value:Function):void
autoCompleteListproperty 
public var autoCompleteList:AutoCompleteList

The actual autocomplete component. Usually a List.

autoCompleteMatchTypeproperty 
autoCompleteMatchType:String

Type of the match to filter items. Can be one of:

The default value is Contains.


Implementation
    public function get autoCompleteMatchType():String
    public function set autoCompleteMatchType(value:String):void
autoCompleteRowCountproperty 
autoCompleteRowCount:int

RowCount for the autocomplete dropdown. Defaults to 5, or max length of the dataprovider, which ever is less.


Implementation
    public function get autoCompleteRowCount():int
    public function set autoCompleteRowCount(value:int):void
autoCompleteSourceproperty 
autoCompleteSource:ICollectionView

The source for the autocomplete dropdown.


Implementation
    public function get autoCompleteSource():ICollectionView
    public function set autoCompleteSource(value:ICollectionView):void
autoCompleteWidthproperty 
autoCompleteWidth:Number

Width of the autocomplete dropdown. If you do not set it, defaults to the width of the text input


Implementation
    public function get autoCompleteWidth():Number
    public function set autoCompleteWidth(value:Number):void
autoRegisterproperty 
autoRegister:Boolean

Register with the container on creation complete


Implementation
    public function get autoRegister():Boolean
    public function set autoRegister(value:Boolean):void
bindingTriggerEventproperty 
bindingTriggerEvent:String

The event to trigger the binding on. Defaults to none, so you must call applyChanges on the container to update the souce object.


Implementation
    public function get bindingTriggerEvent():String
    public function set bindingTriggerEvent(value:String):void
clearTextOnIconClickproperty 
public var clearTextOnIconClick:Boolean = false

If you specify an Icon Style, setting this variable to true will clear the text on icon click. Used for a "clear" icon.

delayDurationproperty 
public var delayDuration:uint = 500

The amount of time (in milliseconds) to wait before dispatching the DELAY_CHANGE event.

The default value is 500.

enableAutoCompleteproperty 
enableAutoComplete:Boolean

Enables autocomplete behavior. Please ensure you set the autocompletesource property.


Implementation
    public function get enableAutoComplete():Boolean
    public function set enableAutoComplete(value:Boolean):void
enableDelayChangeproperty 
public var enableDelayChange:Boolean = true

filterComparisionTypeproperty 
filterComparisionType:String

This is usually automatically set, you don't have to manually set it, unless you're sending strings as Date objects. When set, will attempt to first convert the current value to the type you specified and then do the conversion. Values : auto,string,number,boolean,date

The default value is auto.


Implementation
    public function get filterComparisionType():String
    public function set filterComparisionType(value:String):void
filterOperationproperty 
filterOperation:String

The filter operation to apply to the comparison See the FilterExpression class for a list. Please note, for CheckBoxList and MultiSelectComboBox, this field defaults to "InList" and is ignored when set. see


Implementation
    public function get filterOperation():String
    public function set filterOperation(value:String):void
filterTriggerEventproperty 
filterTriggerEvent:String

The event that the filter triggers on. Defaults to "change", or if the filterRenderer supports com.flexicious.controls.interfaces.IDelayedChange, then the delayedChange event.


Implementation
    public function get filterTriggerEvent():String
    public function set filterTriggerEvent(value:String):void

See also

gridproperty 
grid:IExtendedDataGrid

The grid that the filter belongs to - can be null if filter is used outside the grid


Implementation
    public function get grid():IExtendedDataGrid
    public function set grid(value:IExtendedDataGrid):void
gridColumnproperty 
gridColumn:IDataGridFilterColumn

The grid column that the filter belongs to - can be null if filter is used outside the grid


Implementation
    public function get gridColumn():IDataGridFilterColumn
    public function set gridColumn(value:IDataGridFilterColumn):void
idValueproperty 
public var idValue:String

To enable use of the text input in picker type scenarios where we display a label string in the text input, but expose a store for the ID value.

inputCharValidFunctionproperty 
public var inputCharValidFunction:Function = null

Wire this up where you need character by character validation of entered text.

inputMaskproperty 
inputMask:String

Input mask for the text input


Implementation
    public function get inputMask():String
    public function set inputMask(value:String):void
inputMaskDelimitersproperty 
public var inputMaskDelimiters:String = /,(,),-

A comma seperated list of characters that should be treated as literal characters for input mask purposes. Defaults to /,(,),-

inputMaskForceLengthproperty 
public var inputMaskForceLength:Boolean = true

Does not allow user to add more characters than those specified by the mask. Set to true for date type masks, and false for telephone type masks where you would want the user to be able to enter an extension. Defaults to true

rendererStyleNameproperty 
public var rendererStyleName:String

searchFieldproperty 
searchField:String

The field to search on, usually same as the data field.


Implementation
    public function get searchField():String
    public function set searchField(value:String):void
showIconWhenHasTextproperty 
showIconWhenHasText:Boolean

Flag to control whether the icon only shows up when there is text in the box


Implementation
    public function get showIconWhenHasText():Boolean
    public function set showIconWhenHasText(value:Boolean):void
watermarkproperty 
watermark:String

The watermark to show when there is no text entered into the text input.


Implementation
    public function get watermark():String
    public function set watermark(value:String):void
Method Detail
adjustFocusRect()method
override protected function adjustFocusRect(obj:DisplayObject = null):void

Parameters

obj:DisplayObject (default = null)

applyAutoCompleteValue()method 
public function applyAutoCompleteValue():void

Applies the selected item from the list to the autocomplete textbox

applyText()method 
protected function applyText(newText:String):void

Parameters

newText:String

clear()method 
public function clear():void

commitProperties()method 
override protected function commitProperties():void

destroyAutoComplete()method 
public function destroyAutoComplete():void

Destroys the autocomplete list.

dispatchEvent()method 
override public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
filterAutoCompete()method 
protected function filterAutoCompete(item:*):Boolean

Based on the autoCompleteMatchType, filter the autocomplete dataprovider that

Parameters

item:*

Returns
Boolean
forceFilter()method 
protected function forceFilter():void

getValue()method 
public function getValue():Object

Generic function that returns the value of a IFilterControl. For the textInput, this is the text of the TextBox.

Returns
Object
keyDownHandler()method 
override protected function keyDownHandler(event:KeyboardEvent):void

If the mouse is clicked up, and we dont own the target, kill autocomplete.

Parameters

event:KeyboardEvent

onAutoCompleteItemClick()method 
protected function onAutoCompleteItemClick(event:Event):void

Apply the list item value.

Parameters

event:Event

onAutoCompleteMouseUpHandler()method 
protected function onAutoCompleteMouseUpHandler(event:Event):void

If the mouse is clicked up, and we dont own the target, kill autocomplete.

Parameters

event:Event

onDelayedChange()method 
protected function onDelayedChange(evt:Event):void

On delayed change, trigger autocomplete

Parameters

evt:Event

onInsideIcon()method 
protected function onInsideIcon(evt:Event):void

When icon is enabled, handles the click event of the icon. If clearTextOnIconClick is set to true, clears the text. Dispatches the INSIDE_ICON_CLICK event.

Parameters

evt:Event

onKeyDown()method 
protected function onKeyDown(event:KeyboardEvent):void

Parameters

event:KeyboardEvent

onOutsideIcon()method 
protected function onOutsideIcon(evt:Event):void

When icon is enabled, handles the click event of the icon. If clearTextOnIconClick is set to true, clears the text. Dispatches the INSIDE_ICON_CLICK event.

Parameters

evt:Event

onRemovedFromStage()method 
protected function onRemovedFromStage(event:Event):void

If autocompete it shown, destroy it.

Parameters

event:Event

onTextInput()method 
protected function onTextInput(event:TextEvent):void

Parameters

event:TextEvent

setIconVisible()method 
protected function setIconVisible(event:Event):void

Parameters

event:Event

setMask()method 
protected function setMask(userInput:String, advanceCursor:Boolean = false):void

On basis of the current text, sets the value of the mask.

Parameters

userInput:String
 
advanceCursor:Boolean (default = false)

setSourceFromControl()method 
public function setSourceFromControl():void

setStyle()method 
override public function setStyle(styleProp:String, newValue:*):void

Parameters

styleProp:String
 
newValue:*

setupInputMask()method 
public function setupInputMask():void

If you set the inputMask after creation complete, call this function.

setValue()method 
public function setValue(val:Object):void

Generic function that sets the value of a IFilterControl

Parameters

val:Object

Event Detail
delayedChange Event

When there are multiple change events dispatched within a short time frame, you can listen to this event instead, which will only dispatch once after waiting for a period specified by the delayDuration property, regardless of how many times the change event has dispatched.

insideIconClick Event  

Dispatched when the user clicks on a the icon specified by the insideIcon property

outsideIconClick Event  

Dispatched when the user clicks on a the icon specified by the outsideIcon property

Constant Detail
AUTO_COMPLETE_MATCH_TYPE_BEGINS_WITHConstant
public static const AUTO_COMPLETE_MATCH_TYPE_BEGINS_WITH:String = BeginsWith

Match all items in the autocomplete dataprovider that start with the value of the text property

AUTO_COMPLETE_MATCH_TYPE_CONTAINSConstant 
public static const AUTO_COMPLETE_MATCH_TYPE_CONTAINS:String = Contains

Match all items in the autocomplete dataprovider that contain the value of the text property

AUTO_COMPLETE_MATCH_TYPE_ENDS_WITHConstant 
public static const AUTO_COMPLETE_MATCH_TYPE_ENDS_WITH:String = EndsWith

Match all items in the autocomplete dataprovider that end with the value of the text property

INSIDE_ICON_CLICKConstant 
public static const INSIDE_ICON_CLICK:String = insideIconClick

OUTSIDE_ICON_CLICKConstant 
public static const OUTSIDE_ICON_CLICK:String = outsideIconClick