-
Nov 14th, 2005, 07:33 PM
#1
status.errorCodes doesn't match BindException.getAllErrors()
In my SimpleFormController I have:
protected ModelAndView processFormSubmission(HttpServletRequest request,
HttpServletResponse response, Object o, BindException e)
throws Exception {
System.out.println(e.getAllErrors());
return super.onSubmit(request, response, o, e);
}
which returns the following:
Field error in object 'test' on field 'urls[0].link':
rejected value [url 1 link];
codes [longLink.test.urls[0].link, longLink.test.urls.link, longLink.urls[0].link, longLink.urls.link, longLink.link, longLink.java.lang.String, longLink];
However, iterating through the errorCodes in JSP only displays the "longLink" error code. Am I missing something?
<spring:bind path="urls[${vs.index}].link">
<c:if test="${! empty status.errorCode}">
<c:forEach items="${status.errorCodes}" var="ec">
EC: <c:out value="${ec}"/> <br />
</c:forEach>
<blink><spring:message code="${status.errorCode}" /></blink>
</c:if>
<input name="${status.expression}" value="${status.value}" /> <br />
</spring:bind>
Thanks!!!
Always Learning
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules