Le jeudi 26 juillet 2007 à 00:19 -0700, sabatier a écrit :
> Hi I have an ArrayList of checkbox values from a form. The ArrayList is
> populated in the following way in a java servlet (where 'rw' is the
> ArrayList):
>
> if ( item.isFormField() && item.getFieldName().equalsIgnoreCase("rw")) {
> rw.add(item.getString());
> }
>
> .
> .
> .
> context.put("rw", rw);
>
> I want to put these values into a velocity/xml template using the #foreach
> loop.
> eg.
>
> #foreach( $item in $rw)
> $item
> #end
>
> This isn't working however. Could someone tell me where I'm going wrong?
> Any help would be appreciated.
Can you tell us more? What is happening exactly?
You can print usefull debugging informations in VTL, like:
the arraylist: $rw ## should display sthing like "{ item1 item2 }"
its length: $rw.size()
#foreach($item in $rw)
found class $item.class.name
#end
etc...
Claude
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]