I have found that if I put a java list directly in the model map, that it will never get iterated over when I use a <c:forEach, but if i make a bean for that list with getters and setters, it will work just fine. Is this expected behavior?
Example:
<spring:bind path="attendeeEntries.attendees">
<c:forEach items="${status.value}" var="x">
<b><c:out value="${x.lastName}"/></b><br>
</c:forEach>
</spring:bind> ---- that works, but below does not...
<spring:bind path="attendeeEntries">
<c:forEach items="${status.value}" var="x">
<b><c:out value="${x.lastName}"/></b><br>
</c:forEach>
</spring:bind>
In the first example, I am using a wrapper to the list, in the second example, the java.util.List is being put in the model directly. I am using Spring v1.1.3


Reply With Quote