I found another use case where <spring:bind> as is breaks standard <c:forEach> usage:
This one should work (typed it here, without testing):
Code:
<c:forEach items="${model.items}" var="item" varStatus="loopStatus">
<spring:bind path="model.items[${loopStatus.index}]">${status.value}</spring:bind>
</c:forEach>
Having a list directly as command object works with <c:forEach> but breaks in <spring:bind>:
Code:
<c:forEach items="${items}" var="item" varStatus="loopStatus">
<spring:bind path="items[${loopStatus.index}]">${status.value}</spring:bind>
</c:forEach>
This behaviour is not really understandable. I'd need to introduce a DTO just for storing the list.
This sample is not really an argument pro <spring:newPath>. It just shows where <spring:bind> is not usable despite <c:forEach> works. <spring:newPath> would be a nice work around for it as I could bind the item to a localName.
Jörg