Results 1 to 4 of 4

Thread: Explicit properties completely broken with 1.0RC1?

  1. #1
    Join Date
    Nov 2009
    Posts
    14

    Default Explicit properties completely broken with 1.0RC1?

    From PropertyElementsPreprocessor:

    Code:
    var propertyElements:XMLList = xml.property.(attribute("file") == undefined);
    var properties:Properties = new Properties();
    						
    for each(var child:XML in propertyElements){
        properties.setProperty(child.attribute("name")[0], child.attribute("value")[0]);
    }
    			
    _objectFactory.properties.merge(properties);	
    return xml;
    This does not seem to work with namespaces at all, so a property element does not work in a file such as:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <objects xmlns="http://www.springactionscript.org/schema/objects"
    		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		 xsi:schemaLocation="http://www.springactionscript.org/schema/objects http://www.springactionscript.org/schema/objects/spring-actionscript-objects-1.0.xsd">
    
    	<property name="foo" value="bar"/>
    </objects>
    The other preprocessors define a default namespace like this:
    use namespace spring_actionscript_objects;

    Am I overlooking something, or does this mean that its impossible to active explicit properties at the moment?

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default this is a bug I think

    Hi there,

    this seems to be a bug, can you please file a bugreport in JIRA for this? That way we'll look into it a.s.a.p., it can be fixed before the upcoming 1.0 release.

    http://jira.springframework.org/brow...ACTIONSCRIPTAS

    cheers,

    Roland

  3. #3
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default indeed

    The namespace was indeed missing from the preprocessor, I've added it. I haven't had a chance to test whether this solves the issue though. If you have some time to spare and feel up to it, I'd appreciate it.

    cheers,

    Roland

  4. #4
    Join Date
    Oct 2010
    Posts
    1

    Default Property loading from local machine

    I've noticed that I cannot inject properties as per this thread but also cannot load properties as the framework is injecting a random number at the end of the property file. As per the documentation, the prevent-cache attribute should fix this but doesn't. I looked at the source code and noticed that addPropertyLocationsIfAny method has been commented it out in XMLApplicationContext.

    I'd be happy to test any fixes you have.
    Last edited by Socky; Oct 15th, 2010 at 12:05 AM. Reason: Misspelling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •