This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Validation errors not displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Validation errors not displayed" Watch "Validation errors not displayed" New topic
Author

Validation errors not displayed

Art Vandelay
Ranch Hand

Joined: Dec 27, 2009
Posts: 49
I have the following situation. I have a validator to validate my command object and set the errors on a Errors object to be displayed in my form. The validator is invoked as expected and works okay, but the errors i set on the Errors objects are not displayed, eventho i am being sent back to my form because of the validation errors.

Validator:


Command:


Form:


Controller:


Could it be that the paths i give in the validator and <form:error .../> tag are not correct? The validator validates a command object containing a list of objects, so that's why i give a index on the list in the command object when registering an error message (for example: "fields["+index+"]".value).
Or is it that the Errors object containing the errors is not available to my view?

Any help is welcome and appreciated, it might give me a hint or point me in right direction.
 
Consider Paul's rocket mass heater.
 
subject: Validation errors not displayed
 
Similar Threads
Using a form to pass non-string objects to a bean
How can I get a normal input tag's value?
get parameter from Form page in validator
Spring Commons Validation with AbstractWizardFormController
Wrapped list in command object