freakyd
Aug 14th, 2007, 03:31 PM
I'm using the <form:form> tag and wanted to do the eqivalent of
<nested:iterate id="iterate" property="suggestionList" indexId="i">
<tr>
<td>
<nested:select name="iterate" property="title">
<html:option value="Mr">Mr</html:option>
<html:option value="Ms">Ms</html:option>
<html:option value="Mrs">Mrs</html:option>
<html:option value="Miss">Miss</html:option>
</nested:select>
</td>
</tr>
</nested:iterate>
I considered using the JSTL tag <c:forEach>, but I'm not sure if this works with the Spring MVC command object :-
<c:forEach items="${suggestionsList}" var="suggestion" varStatus="status">
<tr>
<td>
<form:select path="suggestion.title">
<form:option value="Mr">Mr</form:option>
<form:option value="Ms">Ms</form:option>
<form:option value="Mrs">Mrs</form:option>
<form:option value="Miss">Miss</form:option>
</form:select>
</td>
</tr>
</c:forEach>
On a related note, I was hoping there would be an example Spring MVC application demostrating the use of the <form:form> tag & all the other tags in the "spring-form.tld" on the Spring website, but I couldn't find one - does such a thing exist, since if it does it probably has the answer to my question ?
cheers,
<nested:iterate id="iterate" property="suggestionList" indexId="i">
<tr>
<td>
<nested:select name="iterate" property="title">
<html:option value="Mr">Mr</html:option>
<html:option value="Ms">Ms</html:option>
<html:option value="Mrs">Mrs</html:option>
<html:option value="Miss">Miss</html:option>
</nested:select>
</td>
</tr>
</nested:iterate>
I considered using the JSTL tag <c:forEach>, but I'm not sure if this works with the Spring MVC command object :-
<c:forEach items="${suggestionsList}" var="suggestion" varStatus="status">
<tr>
<td>
<form:select path="suggestion.title">
<form:option value="Mr">Mr</form:option>
<form:option value="Ms">Ms</form:option>
<form:option value="Mrs">Mrs</form:option>
<form:option value="Miss">Miss</form:option>
</form:select>
</td>
</tr>
</c:forEach>
On a related note, I was hoping there would be an example Spring MVC application demostrating the use of the <form:form> tag & all the other tags in the "spring-form.tld" on the Spring website, but I couldn't find one - does such a thing exist, since if it does it probably has the answer to my question ?
cheers,