File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes [Stripes] forms: display errors from @ValidateNestedProperties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "[Stripes] forms: display errors from @ValidateNestedProperties" Watch "[Stripes] forms: display errors from @ValidateNestedProperties" New topic

[Stripes] forms: display errors from @ValidateNestedProperties

Gabriele Fabbri
Ranch Hand

Joined: Dec 05, 2008
Posts: 30

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:

OverZero Software
Gabriele Fabbri
Ranch Hand

Joined: Dec 05, 2008
Posts: 30
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.

I agree. Here's the link:
subject: [Stripes] forms: display errors from @ValidateNestedProperties
It's not a secret anymore!