Results 1 to 6 of 6

Thread: error messages

  1. #1
    Join Date
    Aug 2010
    Posts
    4

    Default 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

  2. #2
    Join Date
    Mar 2010
    Location
    Boston, MA
    Posts
    316

    Default

    I think you can use

    Code:
    <form:errors path="*"/>
    to display all the errors.

  3. #3
    Join Date
    Aug 2010
    Posts
    4

    Default

    Hello,
    thanks for your reply.
    This works within form:form tag fine.
    Unfortunately outside of form:form it displays nothing.

    Regards,
    Rodrigo Pereira

  4. #4
    Join Date
    Mar 2010
    Location
    Boston, MA
    Posts
    316

    Default

    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?

  5. #5
    Join Date
    Aug 2010
    Posts
    4

    Default

    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

  6. #6
    Join Date
    Mar 2010
    Location
    Boston, MA
    Posts
    316

    Default

    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
  •