Results 1 to 3 of 3

Thread: util:constant doesn't work in lists

  1. #1
    Join Date
    May 2006
    Posts
    2

    Default util:constant doesn't work in lists

    Hi,

    I've been trying out the new Spring 2.0M4 XSD stuff, and I'm running into a problem. I tried converting a bean from the old-style FieldRetrievingFactoryBean to the new util:constant and it seems to be giving me an error because the constant is in a list.

    converted:

    <bean id="foo">
    <property name="ecorePackages">
    <list>
    <bean id="org.eclipse.uml2.UML2Package.eINSTANCE" class="org.springframework.beans.factory.config.Fi eldRetrievingFactoryBean" />
    </list>
    </property>
    </bean>

    to:

    <bean id="foo">
    <util:list id="ecorePackages">
    <util:constant static-field="org.eclipse.uml2.UML2Package.eINSTANCE" />
    </list>
    </bean>

    Surrounding the <util:constant/> in <value></value> doesn't work either.
    Note that the error I am getting is in Eclipse using the Spring IDE 1.3.0.

    It feels like this may be an oversight in the XSD such that it isn't taking into account constants being placed in lists..?

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Please check Jira if this issue is already addressed and add a report if it is not.

    Regards,
    Andreas

  3. #3
    Join Date
    May 2006
    Posts
    2

    Default

    Posted http://opensource.atlassian.com/proj...rowse/SPR-2086. I also fixed the converted to config snippet in the bug to:

    <bean id="foo">
    <property name="ecorePackages">
    <list>
    <util:constant static-field="org.eclipse.uml2.UML2Package.eINSTANCE" />
    </list>
    </property>
    </bean>

    as I realized that the example I originally posted probably wasn't the correct use of util:list.

    Thanks,
    Ed

Posting Permissions

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