Announcement Announcement Module
Collapse
No announcement yet.
Cannot get [Property] tag to work in SAS 1.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot get [Property] tag to work in SAS 1.1

    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
    bug

    Hey there Jan,

    this is quite certainly a bug. The class scanner is trying to resolve properties *before* the external property file has been loaded. This will need to be changed.
    Can you please file a bug report in JIRA for this?

    https://jira.springframework.org/bro...ACTIONSCRIPTAS

    We'll try and get it sorted as soon as possible, but since all the work on the framework is done in our spare time we can't guarantee when exactly that will happen (don't worry, it usually doesn't take weeks).

    cheers,

    Roland

    Comment


    • #3
      Thanks a lot! I will report the issue ...

      Jan Pra×ma

      Comment

      Working...
      X