Packageorg.spicefactory.parsley.flex.tag
Classpublic class ContextAwareTagBase
InheritanceContextAwareTagBase Inheritance ConfigurationTagBase Inheritance flash.events.EventDispatcher

Base class for MXML configuration tags that need to know the nearest Context in the view hierarchy above them. Extends and thus supports all the features of ConfigurationTagBase. Subclasses only have to overwrite the template method handleContext for doing the actual work.



Public Methods
 MethodDefined By
  
ContextAwareTagBase(requiredEvent:String = null, listenerPriority:int = 0, stageBound:Boolean = true, supportsBindings:Boolean = true)
Creates a new instance.
ContextAwareTagBase
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
  
handleContext(context:Context, view:DisplayObject):void
Invoked when the specified context has been found in the view hierarchy and is in the required state.
ContextAwareTagBase
Constructor Detail
ContextAwareTagBase()Constructor
public function ContextAwareTagBase(requiredEvent:String = null, listenerPriority:int = 0, stageBound:Boolean = true, supportsBindings:Boolean = true)

Creates a new instance.

Parameters
requiredEvent:String (default = null) — the event to wait for before invoking the handleContext method
 
listenerPriority:int (default = 0) — the priority to use when adding listeners to the document object this tag is associated with
 
stageBound:Boolean (default = true) — true if the tag should wait until the associated document object is added to the stage before performing its work
 
supportsBindings:Boolean (default = true) — true if this tag supports binding and thus has to wait until the associated document object is initialized before performing its work
Method Detail
handleContext()method
protected function handleContext(context:Context, view:DisplayObject):void

Invoked when the specified context has been found in the view hierarchy and is in the required state. The required state depends on the requiredEvent parameter passed to the constructor (either ContextEvent.INITIALIZED or ContextEvent.CONFIGURED or null). If no Context was found the parameter will be null. It is up to the concrete tag implementation to decide whether this should be treated as an Error or not.

Parameters

context:Context — the Context that was found in the view hierarchy above this tag or null if none was found
 
view:DisplayObject — the fully initialized view this tag was placed upon