Packageorg.spicefactory.parsley.core.view
Interfacepublic interface ViewConfiguration
Implementors DefaultViewConfiguration

Represents the configuration for a single target in a view to get processed by the nearest Context in the view hierarchy above.



Public Properties
 PropertyDefined By
  autoremove : Flag
Indicates whether the target should be removed when the view is removed from the stage.
ViewConfiguration
  configId : String
[read-only] The configuration id to use to look up an object definition matching this target instance.
ViewConfiguration
  definition : DynamicObjectDefinition
The object definition to use to configure the target.
ViewConfiguration
  lifecycle : ViewLifecycle
The instance that controls the lifecycle of the view.
ViewConfiguration
  processor : ViewProcessor
The processor to use for the target instance.
ViewConfiguration
  reuse : Flag
Indicates whether the target instance will be reused in subsequent lifecycles of the view.
ViewConfiguration
  target : Object
[read-only] The target to get processed by the nearest Context in the view hierarchy.
ViewConfiguration
  view : DisplayObject
[read-only] The view that demarcates the lifecycle of the target instance.
ViewConfiguration
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