Expressions like the following will not work:
<c:if test="${status.value == session }">selected="true"</c:if>
Instead it should be the following:
<c:if test="${criteria.session.value == session.value }">selected="true"</c:if>
Here's a more complete example:
<b>Session: </b>
<spring:bind path="criteria.session">
<select name="${status.expression }" >
<c:forEach items="${sessions}" var="session" >
<option value='${session.value }'
<c:if test="${criteria.session.value == session.value }">selected="true"</c:if>
>${session.name}</option>
</c:forEach>
</select>
</spring:bind>
No comments:
Post a Comment