Package | org.spicefactory.parsley.flex.tag |
Class | public class ContextAwareTagBase |
Inheritance | ContextAwareTagBase ConfigurationTagBase flash.events.EventDispatcher |
ConfigurationTagBase
.
Subclasses only have to overwrite the
template method handleContext
for doing the actual work.
Method | Defined By | ||
---|---|---|---|
ContextAwareTagBase(requiredEvent:String = null, listenerPriority:int = 0, stageBound:Boolean = true, supportsBindings:Boolean = true)
Creates a new instance. | ContextAwareTagBase |
Method | Defined By | ||
---|---|---|---|
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 |
ContextAwareTagBase | () | Constructor |
public function ContextAwareTagBase(requiredEvent:String = null, listenerPriority:int = 0, stageBound:Boolean = true, supportsBindings:Boolean = true)
Creates a new instance.
ParametersrequiredEvent: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
|
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
|