Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Stripes] forms: display errors from @ValidateNestedProperties

 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I added a @ValidateNestedProperties validation inside an action bean, setting some properties as required.
When I submit the not-filled form I don't get the error messages in the jsp as aspected: it goes back to the form but errors are not displayed.
In the past I did some test using @Validate for simple validation on non-object properties fields and it worked fine... there is something different in this case?

This is the jsp form:


This is the ActionBean:


And this is the model class:
 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Puah!
I solved the problem, and it was a very stupid mistake in the end.
The problem was in the form, I wrote <stripes:errors/> but the correct prefix is "s" not "stripes".
It works fine now.

Gabriele
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic