You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "G.L. Grobe" <ga...@grobe.net> on 2002/04/13 21:41:23 UTC

velocity and webwork

A little clarification of a repost ... I'm trying to iterate through objects
within a #foreach.

I've got a webwork ActionSupport class with methods that query the database
and return the objects in a Vector (well, not directly anyways, but that's
what they return).

Below is what I'm trying to do, but don't understand how to iterate the
fields of the objects or get them into properties (or add them to a context
in a webwork action) so that they can be used like the following:

#foreach ($set in $toolSets)
<tr>
   <td><input type="checkbox" name="$set.name" value="$set.toolId"></td>
   <td>$set.name</td>
   <td>$set.desc</td>
</tr>
#end

So the method getToolSets() in my ActionSupport class currently returns a
Vector of these obj's, but how to itereate through their fields is what I'm
not getting.

Any help much appreciated.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>