Hi everyone and thanks for a very informative board![]()
Being relatively new with Spring I've run into a problem that I so far have not been able to solve. I'm building a FormWizard that will stretch over several jsp-pages, and some of the data entered in one page of the wizard will dynamically create objects that will need to be completed with information in the next page of the wizard.
The problem I'm having is to iterate over the dynamically created collection of objects, and properly bind them using the spring tag. The following piece of code is how it looks currently:
<c:forEach var="division" items="${leagueForm.league.divisions}">
<tr>
<td>
<spring:bind path="division.name">
<input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
</td>
</tr>
</c:forEach>
The league object in the form contains a collection of division objects, and each division object has a simple get/setName method. Just printing the contents of each division object without using Spring works fine, but the binding process is beyond me. Does anyone know how to perform this type of binding on objects in a collection, where the amount of objects vary?
Any information or references to other sources would be very appreciated!
Cheers,
Mathias


Reply With Quote