Does the XML config support List as a standalone element?
I am trying to create a list with elements and have other beans reference this list. It seems the only way to do this is something like the following
<bean id="attributeList" class="org.springframework.beans.factory.config.Me thodInvokingFactoryBean">
<property name="targetObject"><ref local="characterPrototype"/></property>
<property name="targetMethod"><value>getAttributes</value></property>
</bean>
<bean id="call00" class="org.springframework.beans.factory.config.Me thodInvokingFactoryBean">
<property name="targetObject"><ref local="pdPrototype"/></property>
<property name="targetMethod"><value>setAttributeList</value></property>
<property name="arguments">
<list>
<ref bean="attributeList"/>
</list>
</property>
</bean>
Is there a mechanism to make a list a top level element in the application context?
<list id="attributeList>
<ref bean="..."/>
</list>
<bean ..>
<property name="attributeList">
<ref bean="attributeList" />
</property>
</bean>
In general can any of the bean element tags (List, Set, Map, and Properties) be used at the top level?
thanks