Package | org.spicefactory.parsley.core.events |
Class | public class ViewConfigurationEvent |
Inheritance | ViewConfigurationEvent flash.events.Event |
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.
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
ViewConfigurationEvent(type:String, configurations:Array, callback:Function = null)
Creates a new event instance. | ViewConfigurationEvent | ||
forAutowiring(view:DisplayObject):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 | ||
markAsCompleted():void
Marks this event instance as processed by a corresponding Context. | ViewConfigurationEvent | ||
markAsReceived():void
Marks this event instance as received by a corresponding Context. | ViewConfigurationEvent |
Constant | Defined 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 |
configurations | property |
configurations:Array
[read-only] The view configurations to get processed.
public function get configurations():Array
received | property |
received:Boolean
[read-only] Indicates whether this event instance has already been processed by a Context.
public function get received():Boolean
ViewConfigurationEvent | () | Constructor |
public function ViewConfigurationEvent(type:String, configurations:Array, callback:Function = null)
Creates a new event instance.
Parameterstype:String — the type of the event
| |
configurations:Array — one or more ViewConfigurations that should get processed
| |
callback:Function (default = null )
|
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
|
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
|
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
|
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.
AUTOWIRE_VIEW | Constant |
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_VIEW | Constant |
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.