Package | com.asfusion.mate.actions |
Class | public class PropertyInjector |
Inheritance | PropertyInjector AbstractAction |
Implements | IAction |
Property | Defined by | ||
---|---|---|---|
softBinding : Boolean
Flag that will be used to define the type of binding used by the PropertyInjector tag.
| PropertyInjector | ||
source : *
An object that contains the data that the injector will use to set the target object
| PropertyInjector | ||
sourceCache : String
If the source is a class we will try to get an instance of that class from the cache.
| PropertyInjector | ||
sourceKey : String
The name of the property on the source object that the injector will use to read and set on the target object
| PropertyInjector | ||
targetId : String
This tag will run if any of the following statements is true:
If the targetId is null.
| PropertyInjector | ||
targetKey : String
The name of the property that the injector will set in the target object
| PropertyInjector |
Method | Defined by | ||
---|---|---|---|
The last method that
trigger calls. | AbstractAction | ||
createInstance(scope:IScope):Object
Creates an instance of the
source class. | PropertyInjector | ||
The first method that
trigger calls. | PropertyInjector | ||
Where all the action occurs.
| PropertyInjector | ||
setProperties(scope:IScope):void
Where all the properties are set into the
currentInstance . | AbstractAction |
softBinding | property |
softBinding:Boolean
[read-write]Flag that will be used to define the type of binding used by the PropertyInjector tag. If softBinding is true, it will use weak references in the binding. Default value is false
The default value is false
.
public function get softBinding():Boolean
public function set softBinding(value:Boolean):void
source | property |
source:*
[read-write]An object that contains the data that the injector will use to set the target object
The default value is null
.
public function get source():*
public function set source(value:*):void
sourceCache | property |
sourceCache:String
[read-write]If the source is a class we will try to get an instance of that class from the cache. This property defines whether the cache is local, global, or inherit.
The default value is inherit
.
public function get sourceCache():String
public function set sourceCache(value:String):void
sourceKey | property |
sourceKey:String
[read-write]The name of the property on the source object that the injector will use to read and set on the target object
The default value is null
.
public function get sourceKey():String
public function set sourceKey(value:String):void
targetId | property |
targetId:String
[read-write]This tag will run if any of the following statements is true: If the targetId is null. If the id of the target matches the targetId. Note:Target is the instance of the target class.
The default value is null
.
public function get targetId():String
public function set targetId(value:String):void
targetKey | property |
targetKey:String
[read-write]The name of the property that the injector will set in the target object
The default value is null
.
public function get targetKey():String
public function set targetKey(value:String):void
createInstance | () | method |
protected function createInstance(scope:IScope):Object
Creates an instance of the source
class.
scope:IScope |
Object |
prepare | () | method |
protected override 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.
scope:IScope |
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.
scope:IScope |