Binding a select box to a Collection (with Spring)

Posted by WiPU on Stack Overflow See other posts from Stack Overflow or by WiPU
Published on 2012-04-13T11:24:17Z Indexed on 2012/04/13 11:29 UTC
Read the original article Hit count: 154

Filed under:
|

i have the following problem. I have a form bean and in this bean is a list with objects.

List<SomeObjectForm> toDisplay;

Now i want map a html select to this list. Something like that:

<form:select id="inputGroupFields" path="templateKey" multiple="true"...
<form:select id="inputGroupFields" path="templateKey.id" multiple="true"...

And this dosnt work of course. Now i have tryed to add different custom Converter like:

myConv implements Converter<SomeObjectForm, String>
myConv extends StringToObject

And this also not work. I'm not sure if this is the right approach or there is a easier way to do that.

Some addional Infos: -->i'm using spring 3.0.5 -->all this happens during a web flow

regards and thanks,

WiPu

© Stack Overflow or respective owner

Related posts about spring

Related posts about spring-mvc