Packagecom.asfusion.mate.actions
Classpublic class AbstractAction
Implementsmx.core.IMXMLObject
SubclassesBaseAction, CacheSetter, DataCopier, InlineInvoker, ListenerInjector, PropertyInjector, StopHandlers

AbstractAction is a base class for all classes implementing IAction.



Protected Properties
 PropertyDefined by
  currentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
  document : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
Public Methods
 MethodDefined by
  
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
  
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
  
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
  
prepare(scope:IScope):void
The first method that trigger calls.
AbstractAction
  
run(scope:IScope):void
Where all the action occurs.
AbstractAction
  
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
AbstractAction
Property detail
currentInstanceproperty
protected var currentInstance:* = null

The currentInstance is the Object that this class will use and modify to do its work. The type of this object depends on the child implementations.

Usually, this currentInstance is set or created in the prepare method, but it is not mandatory.

The default value is null.

documentproperty 
protected var document:Object

A reference to the document object associated with the IActionList that contains this action item. A document object is an Object at the top of the hierarchy of a Flex application, MXML component, or AS component.

Method detail
complete()method
protected function complete(scope:IScope):void

The last method that trigger calls. This is your last chance to perform any action before the IActionList calls the next IAction in the list.

Parameters
scope:IScope
initialized()method 
public function initialized(document:Object, id:String):void

Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.

Parameters
document:Object
 
id:String
prepare()method 
protected function prepare(scope:IScope):void

The first method that trigger calls. Usually, this is where the currentInstance is created or set if needed. In this method you can also perform any code that must be done first.

Parameters
scope:IScope
run()method 
protected function run(scope:IScope):void

Where all the action occurs. At this moment, the currentInstance is already instantiated and all the properties are already set.

Parameters
scope:IScope
setProperties()method 
protected function setProperties(scope:IScope):void

Where all the properties are set into the currentInstance. At this time, the currentInstance is already intantiated and ready to be set.

Parameters
scope:IScope
trigger()method 
public function trigger(scope:IScope):void

This method gets called when the IActionList (ex: EventHandlers) is running. This method is called on each IAction that the IActionList contains in its listeners array.

It is recomended that you do not override this method unless needed. Instead, override the four methods that this method calls (prepare, setProperties, run or complete).

. Parameters
scope:IScope