I'm porting my Coldspring xml into Wirebox, but I'm stuck.
<map>
in Coldspring can create a struct of singletons and then pass that struct into the 'bean' by constructor or setter. And <list>
creates an array.
What do I write in Wirebox.cfc to do the same thing?
<bean id="Foo" class="com.foo">
<constructor-arg name="something">
<map>
<entry key="apple">
<ref bean="apple"/>
</entry>
<entry key="banana">
<ref bean="banana"/>
</entry>
</map>
</constructor-arg>
</bean>
<bean id="bar" class="com.bar">
<constructor-arg name="anArray">
<list>
<bean class="com.XX"/>
<bean class="com.YY"/>
</list>
</constructor-arg>
</bean>
Update: I have found a clean way to support this after reading how ColdSpring does it.
First, create a cfc with 2 methods:
Then in wirebox config.cfc:
Original Answer:
Luis Majano's Answer:
He suggested me to file an ER, and here is it: http://coldbox.assembla.com/spaces/coldbox/support/tickets/1387-support-for--list--and--map--of-coldspring-xml