Package | org.spicefactory.parsley.core.view |
Interface | public interface ViewAutowireFilter |
Implementors | AbstractViewAutowireFilter |
<Configure>
tag.
Property | Defined By | ||
---|---|---|---|
eventType : String
The event type to listen to in the view roots. | ViewAutowireFilter |
Method | Defined By | ||
---|---|---|---|
filter(object:DisplayObject):ViewAutowireMode
Makes the final decision whether a view object should be wired to the Context. | ViewAutowireFilter | ||
prefilter(object:DisplayObject):Boolean
Prefilters the specified view object, deciding whether it should be further processed. | ViewAutowireFilter |
eventType | property |
eventType:String
The event type to listen to in the view roots. The listener will be registered for
the capture phase and then pass all views to the prefilter method. The default is
Event.ADDED_TO_STAGE
.
public function get eventType():String
public function set eventType(value:String):void
filter | () | method |
public function filter(object:DisplayObject):ViewAutowireMode
Makes the final decision whether a view object should be wired to the Context.
This method will only be invoked for objects which passed the prefilter method. In a multi-Context scenario in a modular application this method may be invoked in a different filter instance than the prefilter method. The latter will be invoked in the root Context in most cases, this method however will often be invoked in a child Context.
The enumeration value returned by this method indicates how the framework should
deal with this view object. See the ViewAutowireMode
class for details.
Parameters
object:DisplayObject — the view object to filter
|
ViewAutowireMode — an enumeration value that indicates how the framework should
deal with this view object
|
prefilter | () | method |
public function prefilter(object:DisplayObject):Boolean
Prefilters the specified view object, deciding whether it should be further processed. This is primarily for performance optimizations as the final decision whether a view gets wired or not will be made by the filter method. Only objects for which this method returns true will then dispatch a bubbling autowire event. This is necessary as we have to listen in the capture phase first to get a hold on every view object, but must then reroute the event from bottom to top to allow the Context with the lowest position in the view hierarchy to make the final decision.
Parameters
object:DisplayObject — the view object to be filtered
|
Boolean — true if the specified view object should be further processed.
|