Packageorg.spicefactory.parsley.core.view.impl
Classpublic class DefaultViewConfiguration
InheritanceDefaultViewConfiguration Inheritance Object
Implements ViewConfiguration

Default implementation of the ViewConfiguration interface.



Public Properties
 PropertyDefined By
  autoremove : Flag
Indicates whether the target should be removed when the view is removed from the stage.
DefaultViewConfiguration
  configId : String
[read-only] The configuration id to use to look up an object definition matching this target instance.
DefaultViewConfiguration
  definition : DynamicObjectDefinition
The object definition to use to configure the target.
DefaultViewConfiguration
  lifecycle : ViewLifecycle
The instance that controls the lifecycle of the view.
DefaultViewConfiguration
  processor : ViewProcessor
The processor to use for the target instance.
DefaultViewConfiguration
  reuse : Flag
Indicates whether the target instance will be reused in subsequent lifecycles of the view.
DefaultViewConfiguration
  target : Object
[read-only] The target to get processed by the nearest Context in the view hierarchy.
DefaultViewConfiguration
  view : DisplayObject
[read-only] The view that demarcates the lifecycle of the target instance.
DefaultViewConfiguration
Public Methods
 MethodDefined By
  
DefaultViewConfiguration(view:DisplayObject, target:Object = null, configId:String = null)
Creates a new instance.
DefaultViewConfiguration
Property Detail
autoremoveproperty
autoremove:Flag

Indicates whether the target should be removed when the view is removed from the stage. Only has an effect when no custom ViewLifecycle has been set. The exact action to be performed when the view gets removed from the stage is determined by the destroy method of the ViewProcessor.


Implementation
    public function get autoremove():Flag
    public function set autoremove(value:Flag):void
configIdproperty 
configId:String  [read-only]

The configuration id to use to look up an object definition matching this target instance. If a definition has already been set for this configuration instance, this value will be ignored.


Implementation
    public function get configId():String
definitionproperty 
definition:DynamicObjectDefinition

The object definition to use to configure the target. This property is optional. Some ViewProcessors may look for an object definition in the Context that matches the target instance getting processed when this value is null.


Implementation
    public function get definition():DynamicObjectDefinition
    public function set definition(value:DynamicObjectDefinition):void
lifecycleproperty 
lifecycle:ViewLifecycle

The instance that controls the lifecycle of the view. This property may be null, in this case the default lifecycle installed in the Context for the type of view of this configuration will be used.


Implementation
    public function get lifecycle():ViewLifecycle
    public function set lifecycle(value:ViewLifecycle):void
processorproperty 
processor:ViewProcessor

The processor to use for the target instance. This property may be null, in this case the default processor installed in the Context will be used.


Implementation
    public function get processor():ViewProcessor
    public function set processor(value:ViewProcessor):void
reuseproperty 
reuse:Flag

Indicates whether the target instance will be reused in subsequent lifecycles of the view. When set to false the configuration will only be processed once. This value should be true if the application keeps instances of the view in memory and adds them back to the stage later. It should be false if the view will get garbage collected once it has been removed from the stage.


Implementation
    public function get reuse():Flag
    public function set reuse(value:Flag):void
targetproperty 
target:Object  [read-only]

The target to get processed by the nearest Context in the view hierarchy.


Implementation
    public function get target():Object
viewproperty 
view:DisplayObject  [read-only]

The view that demarcates the lifecycle of the target instance. The view may be the same instance as the target itself or a different one that just controls the lifecycle. A typical example for the two properties pointing to different instances would be the target being a presentation model that should get added to the Context for the time the view it belongs to is on the stage.


Implementation
    public function get view():DisplayObject
Constructor Detail
DefaultViewConfiguration()Constructor
public function DefaultViewConfiguration(view:DisplayObject, target:Object = null, configId:String = null)

Creates a new instance. If no target is specified the view itself is used as the target.

Parameters
view:DisplayObject — the view that controls the lifecycle of the target
 
target:Object (default = null) — the target to get processed by the Context
 
configId:String (default = null) — the configuration id to use to fetch matching definitions from the Context