-
Sep 2nd, 2010, 06:04 AM
#1
error messages
Hi,
I was wondering if somebody could help me on a issue I am facing.
Is there a easy way to iterate through the errors returned by a controller? I mean, without bind tag and outside of a form tag. I am looking for a very generic way of showing the validation errors.
Regards,
Rodrigo Pereira
-
Sep 2nd, 2010, 07:33 AM
#2
I think you can use
Code:
<form:errors path="*"/>
to display all the errors.
-
Sep 2nd, 2010, 07:42 AM
#3
Hello,
thanks for your reply.
This works within form:form tag fine.
Unfortunately outside of form:form it displays nothing.
Regards,
Rodrigo Pereira
-
Sep 2nd, 2010, 07:45 AM
#4
So the page where you want to display validation errors doesn't have a form tag? Wouldn't you need one anyway to submit form data?
-
Sep 2nd, 2010, 08:13 AM
#5
I do have a form, but i am trying to accomplish this template with sitemesh
[ header ]
[error messages]
[menu | body ]
[ footer ]
so all the error messages are going to be handled by the template and i won't need to care anymore on displaying them.
Regards,
Rodrigo Pereira
-
Sep 2nd, 2010, 08:25 AM
#6
Hmm..then you probably have to hack around the form errors tag..maybe extend it and customize it to work for your situation.
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