|
From: p v. <vt...@ya...> - 2003-05-05 08:04:40
|
I have a question about binding a collection.
I have a simple html table with input fields. My
bean given by formBackingObject (FormController) is a collection of simple beans.
Is it possible to bind every input field with a property of a simple bean?
the code of jsp:
<table>
<i21:bind path="owners.values">
<%int i=0;%>
<c:forEach var="owner" items="${status.value}">
<tr>
<td><input type="text" length="3" value="<c:out value="${owner.code}"/>" name="code<%=i%>"/></td>
<td><input type="text" length="15" value="<c:out value="${owner.firstName}"/>" name="firstname<%=i%>"/></td>
<td><input type="text" length="20" value="<c:out value="${owner.lastName}"/>" name="lastname<%=i%>"/></td>
<td><input type="text" length="40" value="<c:out value="${owner.address}"/>" name="address<%=i%>"/></td>
<td><input type="text" length="25" value="<c:out value="${owner.city}"/>" name="city<%=i%>"/></td>
<td><input type="text" length="15" value="<c:out value="${owner.tel}"/>" name="tel<%=i%>"/></td>
</tr>
<%i++;%>
</c:forEach>
</i21:bind>
</table>
If you cannot bind the collections by the i21:bind tag, how can I send a new collection of
simple beans in the jsp file back to the formcontroller (onSubmit(Object command)) ?
Have you an example?
Thanks in advance,
Peter.
---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. |