Packagecom.asfusion.mate.core
Classpublic class Property
ImplementsIProperty

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 SmartObjects will be parsed before the properties are set. These property must be public.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
setProperties(target:Object, scope:IScope):Object
Will set the targetKey property in the target with the value specified in the source.sourceKey.
Property
Protected Methods
 MethodDefined by
  
getRealObject(obj:*, scope:IScope, cache:String):*
Helper function to get the source object from either a Cache or a SmartObject.
Property
Property detail
sourceproperty
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.

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 the Property tag will use to read and set on the target 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 the Property tag will set in the target 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 object from either a Cache or a SmartObject.

Parameters
obj:*
 
scope:IScope
 
cache:String

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

Parameters
target:Object
 
scope:IScope

Returns
Object