Packageorg.springextensions.actionscript.stage
SVN browsingDefaultObjectDefinitionResolver.as
FisheyeDefaultObjectDefinitionResolver.as
Classpublic class DefaultObjectDefinitionResolver
ImplementsIApplicationContextAware, IObjectDefinitionResolver

Default IObjectDefinitionResolver used for wiring.

Attempt to resolve an IObjectDefinition for the passed object:

  1. Name lookup. Uses objectIdProperty as the object property name to be used to match an object definition (default: "name").
  2. Type lookup. Used if the preceding hasn't find a matching object definition. Will try to find an object definition with the same type of the object (it will assign the object definition only if a single matching object definition is found).
  3. Default object definition. Just assign a default object definition having the object complete class name as id and marked as prototype.

See also

org.springextensions.actionscript.context.support.FlexXMLApplicationContext
FlexStageObjectSelectorFactoryPostProcessor


Documentation reference: how to determine which objectdefinition to use for which stage component

Sample project: stagewiring (source)


Public Properties
 PropertyDefined by
  applicationContext : IApplicationContext
DefaultObjectDefinitionResolver
  lookupByType : Boolean
[write-only]
DefaultObjectDefinitionResolver
  objectIdProperty : String
[write-only]
DefaultObjectDefinitionResolver
Public Methods
 MethodDefined by
  
DefaultObjectDefinitionResolver
  
Resolve an IObjectDefinition for an object to be subsequently wired.
DefaultObjectDefinitionResolver
Property detail
applicationContextproperty
applicationContext:IApplicationContext  [read-write]Implementation
    public function get applicationContext():IApplicationContext
    public function set applicationContext(value:IApplicationContext):void
lookupByTypeproperty 
lookupByType:Boolean  [write-only]

The default value is <code>true</code>.

Implementation
    public function set lookupByType(value:Boolean):void
objectIdPropertyproperty 
objectIdProperty:String  [write-only]

The default value is <code>"name"</code>.

Implementation
    public function set objectIdProperty(value:String):void
Constructor detail
DefaultObjectDefinitionResolver()constructor
public function DefaultObjectDefinitionResolver(applicationContext:IApplicationContext = null)Parameters
applicationContext:IApplicationContext (default = null)
Method detail
resolveObjectDefinition()method
public function resolveObjectDefinition(object:*):IObjectDefinition

Resolve an IObjectDefinition for an object to be subsequently wired.

Parameters
object:* — The object to be wired.

Returns
IObjectDefinition — the IObjectDefinition to be used to wire the passed object.