Nope - this page does have anything attached to an onLoad event (or similar). I do have a bit of javascript (to handle date validation / and pop up calendar) which I have disabled to try this.
The form is too big to post but in the form I display errors
Code:
<spring:bind path="printSearch.*">
<c:forEach items="${status.errorMessages}" var="error">
<c:out value="${error}"/><br>
</c:forEach>
</spring:bind>
As for the form handler (again I am excerpting)
initBinder(HttpServletRequest req, ServletRequestDataBinder binder) is the code already posted.
formBackingObject() just creates a new Object()
referenceData() puts a few values in the model (for drop downs)
onSubmit() can be ignored as I have stubbed it out and just returned a new ModelAndView to a fixed page and errors.getModel().
I have similarly reduced the validator for this form to
Code:
public class TicketPrintSearchValidator implements Validator {
private static final Logger logger = Logger.getLogger(TicketPrintSearchValidator.class);
public boolean supports(Class clazz) {
return clazz.equals(TicketPrintSearch.class);
}
public void validate(Object obj, Errors errors) {
TicketPrintSearch p = (TicketPrintSearch) obj;
}
}
As you say it looks like it should work. I am still using version 1.0 of Spring, it is a currently live system, but I can update Spring if it will do any good.