Package | flexlib.containers |
Class | public class AdvancedForm |
Inheritance | AdvancedForm ![]() |
The Advanced Form component provides Reset, Undo and Redo functionality. Undo and Redo are accessed by pressing "ctrl-Z" and "ctrl-Y" repsectively.
MXML Syntax<flexlib:AdvancedForm Properties undoHistorySize="5" modelType="shared|memory" > ... child tags ... </flexlib:AdvancedForm>
Property | Defined By | ||
---|---|---|---|
isValid : Boolean
Property that allows for one place to know if the From is valid
Default to true, if any Validators are present then it will be set to false
| AdvancedForm | ||
modelType : String
The modelStack handles the data. | AdvancedForm | ||
undoHistorySize : int
The undoHistorySize defaults the number of undos. | AdvancedForm |
Property | Defined By | ||
---|---|---|---|
modelStack : Object | AdvancedForm | ||
_modelType : String = shared | AdvancedForm | ||
noSnapshotFlag : Boolean = false | AdvancedForm | ||
resetSnapshotKey : String = reset
Key for reset snapshot
| AdvancedForm | ||
undoCounter : int = 0 | AdvancedForm | ||
undoCurrentIndex : int = -1 | AdvancedForm | ||
_undoHistorySize : int = 5 | AdvancedForm | ||
validators : Object
LookupTable of isValid flags
| AdvancedForm |
Method | Defined By | ||
---|---|---|---|
resetForm():void
Resets values of the form
| AdvancedForm |
Method | Defined By | ||
---|---|---|---|
childrenCreated():void [override]
Creates snapshot of values for reseting
| AdvancedForm | ||
controlChange(event:Event):void | AdvancedForm | ||
doRedo():void | AdvancedForm | ||
doUndo():void | AdvancedForm | ||
getLastestSnapshot():Object | AdvancedForm | ||
getSnapshotKey(coutner:int):String | AdvancedForm | ||
myKeyDownHandler(event:KeyboardEvent):void | AdvancedForm | ||
resetValues(obj:Object, snapshotKey:String):void | AdvancedForm | ||
setValidatorListenerEvents(event:Event):void
Loop through all Validtors at the same level as the Form and set a Event listener for Valid and Invalid
| AdvancedForm | ||
setValidFlag(event:ValidationResultEvent):void
Handles all valid and invalid events on the validators
| AdvancedForm | ||
snapshotValues(obj:Object, snapshotKey:String):void | AdvancedForm | ||
strChildren(obj:Object):String
Gather references and defaults of all the children
| AdvancedForm | ||
takeSnapshot():void | AdvancedForm | ||
textInputChange(event:FocusEvent):void | AdvancedForm |
_modelType | property |
protected var _modelType:String = shared
_undoHistorySize | property |
protected var _undoHistorySize:int = 5
isValid | property |
isValid:Boolean
Property that allows for one place to know if the From is valid Default to true, if any Validators are present then it will be set to false
This property can be used as the source for data binding.
public function get isValid():Boolean
public function set isValid(value:Boolean):void
modelStack | property |
protected var modelStack:Object
modelType | property |
modelType:String
The modelStack handles the data.
The default value is true
.
public function get modelType():String
public function set modelType(value:String):void
noSnapshotFlag | property |
protected var noSnapshotFlag:Boolean = false
resetSnapshotKey | property |
protected var resetSnapshotKey:String = reset
Key for reset snapshot
undoCounter | property |
protected var undoCounter:int = 0
undoCurrentIndex | property |
protected var undoCurrentIndex:int = -1
undoHistorySize | property |
undoHistorySize:int
The undoHistorySize defaults the number of undos.
The default value is true
.
public function get undoHistorySize():int
public function set undoHistorySize(value:int):void
validators | property |
protected var validators:Object
LookupTable of isValid flags
childrenCreated | () | method |
override protected function childrenCreated():void
Creates snapshot of values for reseting
controlChange | () | method |
protected function controlChange(event:Event):void
Parameters
event:Event |
doRedo | () | method |
protected function doRedo():void
doUndo | () | method |
protected function doUndo():void
getLastestSnapshot | () | method |
protected function getLastestSnapshot():Object
Returns
Object |
getSnapshotKey | () | method |
protected function getSnapshotKey(coutner:int):String
Parameters
coutner:int |
String |
myKeyDownHandler | () | method |
protected function myKeyDownHandler(event:KeyboardEvent):void
Parameters
event:KeyboardEvent |
resetForm | () | method |
public function resetForm():void
Resets values of the form
resetValues | () | method |
protected function resetValues(obj:Object, snapshotKey:String):void
Parameters
obj:Object | |
snapshotKey:String |
setValidatorListenerEvents | () | method |
protected function setValidatorListenerEvents(event:Event):void
Loop through all Validtors at the same level as the Form and set a Event listener for Valid and Invalid
Parameters
event:Event |
setValidFlag | () | method |
protected function setValidFlag(event:ValidationResultEvent):void
Handles all valid and invalid events on the validators
Parameters
event:ValidationResultEvent |
snapshotValues | () | method |
protected function snapshotValues(obj:Object, snapshotKey:String):void
Parameters
obj:Object | |
snapshotKey:String |
strChildren | () | method |
protected function strChildren(obj:Object):String
Gather references and defaults of all the children
Parameters
obj:Object |
String |
takeSnapshot | () | method |
protected function takeSnapshot():void
textInputChange | () | method |
protected function textInputChange(event:FocusEvent):void
Parameters
event:FocusEvent |