Packageorg.spicefactory.parsley.core.events
Classpublic class ViewConfigurationEvent
InheritanceViewConfigurationEvent Inheritance flash.events.Event

Event that fires when one or more view components wish to get processed by the nearest Context. The Event allows to specify a custom ViewProcessor or ViewLifecycle for each object getting processed. If not specified the default set by the Context will be used. Processing a view can mean adding it to the Context or just injecting something into it without making the view itself a managed component. It is a very generic event that just allows to pass objects from the view to the nearest Context for any kind of processing.



Public Properties
 PropertyDefined By
  configurations : Array
[read-only] The view configurations to get processed.
ViewConfigurationEvent
  received : Boolean
[read-only] Indicates whether this event instance has already been processed by a Context.
ViewConfigurationEvent
Public Methods
 MethodDefined By
  
ViewConfigurationEvent(type:String, configurations:Array, callback:Function = null)
Creates a new event instance.
ViewConfigurationEvent
  
[static] Creates a new event instance to be used to trigger the autowiring process.
ViewConfigurationEvent
  
forConfigurations(configurations:Array, callback:Function = null):ViewConfigurationEvent
[static] Creates a new event instance to be used for explicitly passing the targets contained in the specified configuration instances to the nearest Context in the view hierarchy for processing.
ViewConfigurationEvent
  
forExplicitTarget(view:DisplayObject, target:Object = null, configId:String = null):ViewConfigurationEvent
[static] Creates a new event instance to be used for explicitly passing the specified target instance to the nearest Context in the view hierarchy for processing.
ViewConfigurationEvent
  
Marks this event instance as processed by a corresponding Context.
ViewConfigurationEvent
  
Marks this event instance as received by a corresponding Context.
ViewConfigurationEvent
Public Constants
 ConstantDefined By
  AUTOWIRE_VIEW : String = autowireView
[static] Constant for the type of bubbling event automatically fired when a view component is a canididate for getting processed by the nearest Context in the view hierarchy.
ViewConfigurationEvent
  CONFIGURE_VIEW : String = configureView
[static] Constant for the type of bubbling event explicitly fired by a view component that wishes to get processed by the nearest Context in the view hierarchy.
ViewConfigurationEvent
Property Detail
configurationsproperty
configurations:Array  [read-only]

The view configurations to get processed.


Implementation
    public function get configurations():Array
receivedproperty 
received:Boolean  [read-only]

Indicates whether this event instance has already been processed by a Context.


Implementation
    public function get received():Boolean
Constructor Detail
ViewConfigurationEvent()Constructor
public function ViewConfigurationEvent(type:String, configurations:Array, callback:Function = null)

Creates a new event instance.

Parameters
type:String — the type of the event
 
configurations:Array — one or more ViewConfigurations that should get processed
 
callback:Function (default = null)
Method Detail
forAutowiring()method
public static function forAutowiring(view:DisplayObject):ViewConfigurationEvent

Creates a new event instance to be used to trigger the autowiring process. Should normally not be used in application code. The specified view must still pass the installed ViewAutowireFilter.

Parameters

view:DisplayObject — view that is an autowiring candidate

Returns
ViewConfigurationEvent — a new event instance
forConfigurations()method 
public static function forConfigurations(configurations:Array, callback:Function = null):ViewConfigurationEvent

Creates a new event instance to be used for explicitly passing the targets contained in the specified configuration instances to the nearest Context in the view hierarchy for processing.

Parameters

configurations:Array — one or more ViewConfigurations that should get processed
 
callback:Function (default = null) — the no-arg callback to invoke after processing of this event has completed

Returns
ViewConfigurationEvent — a new event instance
forExplicitTarget()method 
public static function forExplicitTarget(view:DisplayObject, target:Object = null, configId:String = null):ViewConfigurationEvent

Creates a new event instance to be used for explicitly passing the specified target instance to the nearest Context in the view hierarchy for processing. If no target is specified the view itself will get passed. Otherwise the view merely acts as helper to demarcate the lifecycle of the actual 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

Returns
ViewConfigurationEvent — a new event instance
markAsCompleted()method 
public function markAsCompleted():void

Marks this event instance as processed by a corresponding Context.

markAsReceived()method 
public function markAsReceived():void

Marks this event instance as received by a corresponding Context.

Constant Detail
AUTOWIRE_VIEWConstant
public static const AUTOWIRE_VIEW:String = autowireView

Constant for the type of bubbling event automatically fired when a view component is a canididate for getting processed by the nearest Context in the view hierarchy. A candidate is a view component that passed the prefilter method of the active ViewAutowireFilter when autowiring is enabled.

CONFIGURE_VIEWConstant 
public static const CONFIGURE_VIEW:String = configureView

Constant for the type of bubbling event explicitly fired by a view component that wishes to get processed by the nearest Context in the view hierarchy.