JEisen
Aug 10th, 2006, 12:06 PM
I've seen references that it's possible to have a command object contain a List, but can't seem to get it to work in practice.
Let's say I have object Foo. I have a form that takes a List<Foo> and outputs a form in the JSP.
<c:forEach var="foo" items="${model.fooList}">
<input type="text" name="fname" value="<c:out value='${foo.fname}'/>">
<input type="text" name="lname" value="<c:out value='${foo.lname}'/>">
</c:forEach>
Class Foo has properties fname and lname.
Command object FooCommand contains List<Foo>.
How do I bind this to the form so that the command object is filled correctly?
Let's say I have object Foo. I have a form that takes a List<Foo> and outputs a form in the JSP.
<c:forEach var="foo" items="${model.fooList}">
<input type="text" name="fname" value="<c:out value='${foo.fname}'/>">
<input type="text" name="lname" value="<c:out value='${foo.lname}'/>">
</c:forEach>
Class Foo has properties fname and lname.
Command object FooCommand contains List<Foo>.
How do I bind this to the form so that the command object is filled correctly?