Announcement Announcement Module
Collapse
No announcement yet.
Property class instance empty? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Property class instance empty?

    Hello all!

    I am using SAS 1.1. with Flex 4 (Hero SDK) and I am trying to make this piece of code work:

    Code:
    [Component(id="resources"]
    	public class Resources
    	{
    		[Property(value="${IconsUrl}")]
    		public var url_icons:String;
    		
    		[Autowired]
    		public var iblort:Iblort;
             ....
            }
    All the time, I get the same error (well, the error is slightly different for the [Autowired(externalProperty="IconsUrl")] tag, but I believe the cause is the same) - Cannot resolve Placeholder "${IconsUrl}".

    I am starting to get nuts, because:

    a) The component scanner should work OK. The class iblort is autowired correctly

    b) The property ${IconsUrl} gets loaded correctly and works inside appContext.xml file !

    c) I downloaded the spring sources. I found, that the Properties object indeed gets filled with correct property data (lenght == 13). Bud somehow, when the class gets scanned, then the _applicationContext.property variable contains totally different Properties object (lenght == 0, id of the object is DIFFERENT than the one that gets created from the properties file).

    Code:
    override public function scan(className:String):void {
    			_resolver = new PropertyPlaceholderResolver();
    			_resolver.properties = _applicationContext.properties;
    "_applicationContext.properties" contains 0 properties (is not null, but empty).

    Am I doing something wrong? At which point is the Properties instance (that gets created from the external props file) assignet to _applicationContext.properties (AbstractObjectFactory.properties) ?

    Thanks for any response!
    Jan Pra×ma

  • #2
    Sorry

    Sorry for double post.

    The thread http://forum.springsource.org/showthread.php?t=98550 is the main one, please any admin or moderator - delete this one ...

    Comment

    Working...
    X