Hello,
I'd like to display all my error messages on top of my pages rather than under each field.
If I read the documentation correctly, I can do the following:
and in my JSP:Code:@RequestMapping(value="/customer", method= RequestMethod.POST) public String show(@ModelAttribute Customer customer, BindingResult result)
But then, I can't reuse the above code snippet because the modelAttribute varies for each page (customer, order, ...).Code:<form:form modelAttribute="customer" ...> <form:errors path="*"/> </form:form>
Is there a (SpringMVC) way to stay DRY in this case?
Bonus noob question: how do I display informative (=non error) messages?
Thanks a bunch!


Reply With Quote
