Packageorg.spicefactory.parsley.flex.tag.view
Classpublic class FastInjectTag
InheritanceFastInjectTag Inheritance ConfigurationTagBase Inheritance flash.events.EventDispatcher

MXML Tag that can be used for views that wish to retrieve a particular object from the IOC Container without actually getting wired to it to avoid the cost of reflection. The tag allows the object to be selected by type or by id.

Default MXML Propertyinjections



Public Properties
 PropertyDefined By
  autoremove : Boolean
[write-only] Indicates whether the injected object should be removed from the Context when the view is removed from the stage and the injected object is a DynamicObject.
FastInjectTag
  injections : Array
List of injections to perform.
FastInjectTag
  objectId : String
The id of the object to inject.
FastInjectTag
  property : String
The property to inject into.
FastInjectTag
  reuse : Boolean
[write-only] Indicates whether the target instance will be reused in subsequent lifecycles of the view.
FastInjectTag
  target : Object
The target object to inject into.
FastInjectTag
  type : Class
The type of the object to inject.
FastInjectTag
Protected Methods
 MethodDefined By
 Inherited
executeAction(view:DisplayObject):void
Invoked when the specified view has been added to the stage and is fully initialized (in case it is a Flex component).
ConfigurationTagBase
Events
 Event Summary Defined By
  Dispatched for the first time after injections have been performed and the creationComplete event of the document this tag is placed upon has been fired.FastInjectTag
  Dispatched after injections have been performed and the creationComplete event of the document this tag is placed upon has been fired.FastInjectTag
  Dispatched immediately after injections have been performed.FastInjectTag
  Dispatched when the component is removed from the stage, but ignores interim events caused by reparenting.FastInjectTag
Property Detail
autoremoveproperty
autoremove:Boolean  [write-only]

Indicates whether the injected object should be removed from the Context when the view is removed from the stage and the injected object is a DynamicObject. Only has an effect when no custom ViewLifecycle has been set.


Implementation
    public function set autoremove(value:Boolean):void
injectionsproperty 
public var injections:Array

List of injections to perform.

objectIdproperty 
public var objectId:String

The id of the object to inject.

propertyproperty 
public var property:String

The property to inject into.

reuseproperty 
reuse:Boolean  [write-only]

Indicates whether the target instance will be reused in subsequent lifecycles of the view. When set to false the injection 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 set reuse(value:Boolean):void
targetproperty 
public var target:Object

The target object to inject into.

typeproperty 
public var type:Class

The type of the object to inject.

Event Detail
addedToStage Event
Event Object Type: flash.events.Event

Dispatched for the first time after injections have been performed and the creationComplete event of the document this tag is placed upon has been fired. Subsequent dispatching will ignore stage events caused by reparenting.

creationComplete Event  
Event Object Type: flash.events.Event

Dispatched after injections have been performed and the creationComplete event of the document this tag is placed upon has been fired.

injectionComplete Event  
Event Object Type: flash.events.Event

Dispatched immediately after injections have been performed.

removedFromStage Event  
Event Object Type: flash.events.Event

Dispatched when the component is removed from the stage, but ignores interim events caused by reparenting.