Announcement Announcement Module
Collapse
No announcement yet.
Context does not autowire external properties anymore Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Context does not autowire external properties anymore

    Contexts used to be able to autowire properties defined in the context via the <property/> tag. Now, this no longer works. Given the following code on an object on the stage in my Flex 4 application:
    Code:
    [Bindable]
    [Autowired(externalProperty="property_a")]
    public var propertyA:String;
    and given the following code in my XML application context:
    Code:
    <?xml version="1.0"?>
    <objects>
    	<property file="application.properties"/>
    	
    	<object id="autowiringStageProcessor" class="org.springextensions.actionscript.stage.DefaultAutowiringStageProcessor"/>
    </objects>
    and given the following code in my 'application.properties' file:
    Code:
    property_a = a
    property_b = b
    property_c = c
    ...I get the following error:
    Code:
    Error: Can't find property referenced in Autowired externalPropertyargument: Unsatisfied dependency in object [null] for property [propertyA]
    	at org.springextensions.actionscript.ioc.autowire::DefaultAutowireProcessor/autoWireFieldByPropertyName()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\autowire\DefaultAutowireProcessor.as:299]
    	at org.springextensions.actionscript.ioc.autowire::DefaultFlexAutowireProcessor/autoWireField()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\autowire\DefaultFlexAutowireProcessor.as:73]
    	at org.springextensions.actionscript.ioc.autowire::DefaultAutowireProcessor/autoWire()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\autowire\DefaultAutowireProcessor.as:183]
    	at org.springextensions.actionscript.ioc.factory.support::AbstractObjectFactory/wire()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\support\AbstractObjectFactory.as:563]
    	at org.springextensions.actionscript.stage::DefaultAutowiringStageProcessor/process()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\DefaultAutowiringStageProcessor.as:162]
    	at org.springextensions.actionscript.stage::FlexStageProcessorRegistry/processDisplayObjectWithStageProcessorRegistration()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlexStageProcessorRegistry.as:297]
    	at org.springextensions.actionscript.stage::FlashStageProcessorRegistry/processDisplayObject()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlashStageProcessorRegistry.as:444]
    	at org.springextensions.actionscript.stage::FlashStageProcessorRegistry/processDisplayObjectRecursively()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlashStageProcessorRegistry.as:467]
    	at org.springextensions.actionscript.stage::FlashStageProcessorRegistry/processDisplayObjectRecursively()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlashStageProcessorRegistry.as:476]
    	at org.springextensions.actionscript.stage::FlexStageProcessorRegistry/processStage()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlexStageProcessorRegistry.as:259]
    	at org.springextensions.actionscript.stage::FlexStageProcessorRegistry/initialize()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\stage\FlexStageProcessorRegistry.as:244]
    	at org.springextensions.actionscript.context.support::FlexXMLApplicationContext/completeHandler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\FlexXMLApplicationContext.as:263]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.context.support::AbstractApplicationContext/resourceLoadQueue_completeHandler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\AbstractApplicationContext.as:456]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.core.operation::AbstractOperation/dispatchCompleteEvent()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\operation\AbstractOperation.as:238]
    	at org.springextensions.actionscript.core.operation::OperationQueue/operation_completeHandler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\operation\OperationQueue.as:122]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.core.operation::AbstractOperation/dispatchCompleteEvent()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\operation\AbstractOperation.as:238]
    	at org.springextensions.actionscript.core.operation::OperationQueue/operation_completeHandler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\operation\OperationQueue.as:122]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.core.operation::AbstractOperation/dispatchCompleteEvent()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\operation\AbstractOperation.as:238]
    	at org.springextensions.actionscript.core.io.support::LoadPropertiesOperation/properties_completeHandler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\core\io\support\LoadPropertiesOperation.as:109]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at org.springextensions.actionscript.collections::Properties/LoaderComplete_handler()[C:\projects\tmp\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\collections\Properties.as:202]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at flash.net::URLLoader/onComplete()
    I have reported this bug to the Spring ActionScript issue tracker here: https://jira.springframework.org/bro...ONSCRIPTAS-127

    Additionally, I have attached a project to this forum thread and to the bug report which demonstrates the problem. I would submit a patch, but I'm kind of in the middle of something right now. You can get the project source here: http://dl.dropbox.com/u/439089/propertyWiringTest.7z

    If you need it in a plain zip file, I can do that too, but I assume that most people these days know what to do with a 7zip file

  • #2
    Hi,

    this should be fixed now in the trunk.

    regards,
    Christophe

    Comment


    • #3
      Thanks guys :-) Keep up the great work!

      Comment

      Working...
      X