Announcement Announcement Module
Collapse
No announcement yet.
util:constant doesn't work in lists Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Please check Jira if this issue is already addressed and add a report if it is not.

    Regards,
    Andreas

    Comment


    • #3
      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

      Comment

      Working...
      X