Packagecom.asfusion.mate.actions.builders
Classpublic class PropertySetter
InheritancePropertySetter Inheritance ObjectBuilder Inheritance BaseAction Inheritance AbstractAction

PropertySetter will create an object of the class specified in the generator attribute. After that, it will set a property in the key attribute on the newly created object. The value to set can be the source object or a property of the source object that is specified in the sourceKey attribute.



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
 InheritedregisterTarget : Boolean
Registers the newly created object as an injector target.
ObjectBuilder
  source : *
An object that contains the data that will be used to set the target object.
PropertySetter
  sourceCache : String
The sourceCache is only useful when the source is a class.
PropertySetter
  sourceKey : String
The name of the property on the source object that will be used to read the value to be set the generated object.
PropertySetter
  targetKey : String
The name of the property that will be set in the generated object.
PropertySetter
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
  
getRealObject(obj:*, scope:IScope, cache:String):*
Helper function to get the source or destination objects from either a String value, a SmartObject or other.
PropertySetter
 Inherited
prepare(scope:IScope):void
The first method that trigger calls.
ObjectBuilder
  
run(scope:IScope):void
Where all the action occurs.
PropertySetter
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Property detail
sourceproperty
source:*  [read-write]

An object that contains the data that will be used to set the target object.

The default value is undefined.

Implementation
    public function get source():*
    public function set source(value:*):void
sourceCacheproperty 
sourceCache:String  [read-write]

The sourceCache is only useful when the source is a class. This attribute defines which cache we will look up for a created object.

Implementation
    public function get sourceCache():String
    public function set sourceCache(value:String):void
sourceKeyproperty 
sourceKey:String  [read-write]

The name of the property on the source object that will be used to read the value to be set the generated object.

The default value is null.

Implementation
    public function get sourceKey():String
    public function set sourceKey(value:String):void
targetKeyproperty 
targetKey:String  [read-write]

The name of the property that will be set in the generated object.

The default value is null.

Implementation
    public function get targetKey():String
    public function set targetKey(value:String):void
Method detail
getRealObject()method
protected function getRealObject(obj:*, scope:IScope, cache:String):*

Helper function to get the source or destination objects from either a String value, a SmartObject or other.

Parameters
obj:*
 
scope:IScope
 
cache:String

Returns
*
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