Packageorg.spicefactory.parsley.core.view.impl
Classpublic class DefaultViewAutowireFilter
InheritanceDefaultViewAutowireFilter Inheritance AbstractViewAutowireFilter Inheritance Object

Default implementation of the ViewAutowireFilter. The default behaviour is to exclude components from packages within mx. spark.and flash.in the prefilter method and then only wire components which have a corresponding <View> tag in the MXML or XML configuration for the Context.



Public Properties
 PropertyDefined By
 InheritedeventType : String
The event type to listen to in the view roots.
AbstractViewAutowireFilter
Public Methods
 MethodDefined By
  
DefaultViewAutowireFilter(settings:ViewSettings = null, excludedTypes:RegExp = null)
Creates a new instance.
DefaultViewAutowireFilter
  
filter(object:DisplayObject):ViewAutowireMode
[override] Makes the final decision whether a view object should be wired to the Context.
DefaultViewAutowireFilter
  
prefilter(object:DisplayObject):Boolean
[override] Prefilters the specified view object, deciding whether it should be further processed.
DefaultViewAutowireFilter
Constructor Detail
DefaultViewAutowireFilter()Constructor
public function DefaultViewAutowireFilter(settings:ViewSettings = null, excludedTypes:RegExp = null)

Creates a new instance.

Parameters
settings:ViewSettings (default = null) — the types to exclude in the prefilter method
 
excludedTypes:RegExp (default = null)
Method Detail
filter()method
override 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

Returns
ViewAutowireMode — an enumeration value that indicates how the framework should deal with this view object
prefilter()method 
override 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

Returns
Boolean — true if the specified view object should be further processed.