|
From: Eugene K. <eu...@pl...> - 2006-05-27 02:57:20
|
I updated SPR-1711 [*] that is requesting support for bean metadata
and attached implementation of custom namespace handler and bean
decorators that allow to declare lists and maps of string as bean
attributes (test and examples are in the archive attached to that jira
issue).
For example:
<bean id="foo">
<meta:list name="testList">
<meta:value>value1</meta:value>
<meta:value>value2</meta:value>
</meta:list>
<meta:map name="testMap">
<meta:entry key="key1">value1</meta:entry>
<meta:entry key="key2">value2</meta:entry>
</meta:map>
</bean>
I wonder if something like this can be incorporated into Spring code?
Thanks
Eugene
[*] http://opensource.atlassian.com/projects/spring/browse/SPR-1711
Eugene Kuleshov wrote:
>
> I am also wondering if it is possible make default xml parser to
> handle nested value, list, set, map and props tag (for simple/string
> types)?
>
> Value element would be more convenient then value attribute e.g.
> multiline CDATA.
>
> Lists are also quite common use case. E.g. somehow made up example:
>
> <meta key="org.javatx.auth.Role">
> <list>
> <value>Admin</value>
> <value>Observer</value>
> </list>
> </meta>
>
> So, as props. Here is an example:
>
> <meta key="org.javatx.Transactional">
> <props>
> <prop key="timeout">1000</prop>
> <prop key="propagation">required</prop>
> <prop key="isolation">serializable</prop>
> </props>
> </meta>
>
>
> Thanks
>
> Eugene
|