Packagecom.asfusion.mate.actions.builders
Classpublic class CommandInvoker
InheritanceCommandInvoker Inheritance ObjectBuilder Inheritance BaseAction Inheritance AbstractAction

The CommandInvoker tag is very similar to the MethodInvokerr tag, but limited. It only allows specifying the generator class to instantiate. It will always call the method execute and pass the current event as its only argument. This tag is very useful when reusing Cairngorm commands. Unless you specify cache="none", this CommandInvoker instance will be "cached" and not instantiated again.

MXML Syntaxexpanded Hide MXML Syntax

The <mx:CommandInvoker> tag has the following tag attributes:

 <CommandInvoker
  Properties
 generator="Class"
 constructorArguments="Object|Array"
 cache="local|global|inherit|none"
  />
 

See also

com.asfusion.mate.actions.builders.MethodInvokerr
com.asfusion.mate.actionLists.EventHandlers


Public Properties
 PropertyDefined by
 Inheritedcache : String
The cache attribute lets you specify whether this newly created object should be kept live so that the next time an instance of this class is requested, this already created object is returned instead.
ObjectBuilder
 InheritedconstructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.
ObjectBuilder
 Inheritedgenerator : Class
The generator attribute specifies what class should be instantiated.
ObjectBuilder
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
 InheritedregisterTarget : Boolean
Registers the newly created object as an injector target.
ObjectBuilder
Protected Properties
 PropertyDefined by
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
 Inherited
createInstance(scope:IScope):Object
Where the currentInstance is created using the generator class as the template, passing arguments to the constructor as specified by the constructorArgs (if any).
ObjectBuilder
 Inherited
prepare(scope:IScope):void
The first method that trigger calls.
ObjectBuilder
  
run(scope:IScope):void
Where all the action occurs.
CommandInvoker
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Method detail
run()method
protected override 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