Results 1 to 2 of 2

Thread: spring sample mvc-ajax project is not displaying errors

  1. #1
    Join Date
    Apr 2010
    Posts
    9

    Default spring sample mvc-ajax project is not displaying errors

    I've checked out revision 591 of the spring sample mvc-ajax project. I've loaded the project and have it running in debug mode in STS.

    When trying to create a new account without a value in the name field, I'm not seeing the error's displayed in the form. I can break into the code with the debugger and see that an error is being returned b/c the validation has failed. However, I see no indication of this validation error in the view.

    How is the error message supposed to be bound back to the view after the json post has failed?

  2. #2
    Join Date
    Apr 2010
    Posts
    9

    Default

    it appears at least part of the problem is running this inside the embedded browser in STS. Running the page through firefox displays the error message when a name is duplicated.

    However, I am still not seeing any errors displayed when I submit the form with an empty name field. Should the fieldValidated method be called when the $.postJSON("account", account, function(data) call fails? Is there no automagic binding of errors back to the form? using these defined tags?


    Code:
    <form:label id="nameLabel" for="name" path="name" cssErrorClass="error">Name</form:label><br/>
    <form:input path="name" />
    <form:errors path="name" />

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •