Packagecom.jadbox.flashmvc
Classpublic class ActionHelper

This class is passed into the first parameter of the constructor of your action class



Public Properties
 PropertyDefined by
  mySuperModel : SuperModel
[read-only] Returns its parent SuperModel for model changing.
ActionHelper
  result : Object
This variable is pushed into the onComplete result object that the view implements by the SuperModel.perform method.
ActionHelper
Public Methods
 MethodDefined by
  
This is called internally as the user never creates a new PerformanceHelper manually.
ActionHelper
  
commit(self:Object, vars:Array = null):void
Copies values back to the supermodel from the action if they have the same property.
ActionHelper
  
complete(successful:Boolean = true):void
Tells the framework that the action class has completed its action and that it can be scheduled for garbage collection.
ActionHelper
  
dispatchEvent(self:*, eventName:String):void
ActionHelper
  
getVar(varName:String):*
Returns a variable value from this action's SuperModel
ActionHelper
  
mySuperModelUpdate(varName:String = null):void
Tells SuperModel listeners that the model has update
ActionHelper
  
setVar(varName:String, value:*):*
Sets a variable value on this action's SuperModel.
ActionHelper
  
setVarRelative(varName:String, value:*):*
Sets a variable value relative to its current value on this action's SuperModel.
ActionHelper
  
update(self:Object, vars:Array = null):void
Copies values from the supermodel to this action if the action has the same property.
ActionHelper
Property detail
mySuperModelproperty
mySuperModel:SuperModel  [read-only]

Returns its parent SuperModel for model changing. Be sure to call mySuperModelUpdate to let SuperModel view listeners know that the SuperModel variables have been updated.

Implementation
    public function get mySuperModel():SuperModel
resultproperty 
result:Object  [read-write]

This variable is pushed into the onComplete result object that the view implements by the SuperModel.perform method. Use this variable when you need to tell only the calling view a certain piece of data.

Implementation
    public function get result():Object
    public function set result(value:Object):void
Constructor detail
ActionHelper()constructor
public function ActionHelper(type_this:SuperModel)

This is called internally as the user never creates a new PerformanceHelper manually.

Parameters
type_this:SuperModel
Method detail
commit()method
public function commit(self:Object, vars:Array = null):void

Copies values back to the supermodel from the action if they have the same property.

Parameters
self:Object — Pass a reference of "this"
 
vars:Array (default = null) — Optional parameter to force only certain property names to synced only
complete()method 
public function complete(successful:Boolean = true):void

Tells the framework that the action class has completed its action and that it can be scheduled for garbage collection.

Parameters
successful:Boolean (default = true)
dispatchEvent()method 
public function dispatchEvent(self:*, eventName:String):voidParameters
self:*
 
eventName:String
getVar()method 
public function getVar(varName:String):*

Returns a variable value from this action's SuperModel

Parameters
varName:String

Returns
*
mySuperModelUpdate()method 
public function mySuperModelUpdate(varName:String = null):void

Tells SuperModel listeners that the model has update

Parameters
varName:String (default = null) — Variable name that was updated
setVar()method 
public function setVar(varName:String, value:*):*

Sets a variable value on this action's SuperModel.

Parameters
varName:String
 
value:*

Returns
*
setVarRelative()method 
public function setVarRelative(varName:String, value:*):*

Sets a variable value relative to its current value on this action's SuperModel. For arrays, it will push the data to the existing array.

Parameters
varName:String
 
value:*

Returns
*
update()method 
public function update(self:Object, vars:Array = null):void

Copies values from the supermodel to this action if the action has the same property.

Parameters
self:Object — Pass a reference of "this"
 
vars:Array (default = null) — Optional parameter to force only certain property names to synced only