Package | com.asfusion.mate.core |
Class | public class Property |
Implements | IProperty |
Property
tag allows you to set a property to an object.
These property can be a mix of SmartObject, normal Objects or object from the cache.
All the SmartObject
s will be parsed before the properties are set.
These property must be public.
Property | Defined by | ||
---|---|---|---|
source : *
An object that contains the data that the Property tag will use to set the target object.
| Property | ||
sourceCache : String
The sourceCache is only useful when the source is a class.
| Property | ||
sourceKey : String
The name of the property on the source object that the Property tag will use to
read and set on the target object
| Property | ||
targetKey : String
The name of the property that the Property tag will set in the target object
| Property |
Method | Defined by | ||
---|---|---|---|
setProperties(target:Object, scope:IScope):Object
Will set the targetKey property in the target with the value specified in the source.sourceKey.
| Property |
Method | Defined by | ||
---|---|---|---|
getRealObject(obj:*, scope:IScope, cache:String):*
Helper function to get the source object
from either a Cache or a SmartObject.
| Property |
source | property |
source:*
[read-write]An object that contains the data that the Property tag 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]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
sourceKey | property |
sourceKey:String
[read-write]The name of the property on the source object that the Property tag 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
targetKey | property |
targetKey:String
[read-write]The name of the property that the Property tag will set in the target object
The default value is null
.
public function get targetKey():String
public function set targetKey(value:String):void
getRealObject | () | method |
protected function getRealObject(obj:*, scope:IScope, cache:String):*
Helper function to get the source object from either a Cache or a SmartObject.
Parametersobj:* |
|
scope:IScope |
|
cache:String |
* |
setProperties | () | method |
public function setProperties(target:Object, scope:IScope):Object
Will set the targetKey property in the target with the value specified in the source.sourceKey. If source is a class, we will try to find the instance in the cache.
Parameterstarget:Object |
|
scope:IScope |
Object |