I have a form that contains over a 100 checkboxes. They have unique
names, and I need to populate them from (Array)List. As a result, I
also need a ArrayList of Strings that contains only elements that user
has checked.

I did so by using LinkedHashMap and tag s:checkboxlist, but I can not
make checkboxes each one in a NEW row. Insted, they are listed one
after another, and that makes the form very ugly and hard to use. I
don't think I need to make a custom template just for this single
purpose.

I tried to use s:checkbox in the s:iterator loop with the same
LinkedHashMap, but I didn't manage to get (array)list of Strings as a
result. Insted I got [true, true, true...] list of booleans, and that
is something I can make usefull data from.

Finnaly, I tried something like this (srvServers is an ArrayList<String>):

 <s:iterator value="srvServers" status="id">
     <s:checkbox name="srvServers[${id}]"/> <s:property />
   <br>
 </s:iterator>

but without result. :(
Is there a way to do this (populate many checkboxes, and get
ArrayList<String> as a result?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to