struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egetchell <>
Subject Re: Struts2.1: Is Validation Annotations on Nested Objects Supported?
Date Thu, 01 May 2008 15:01:23 GMT

Thanks all for the information.  Since it seems that a few others out there
had similar questions, I’ll add to this post for future reference.

Like the Action examples, as long as the get...() property on the parent
class is properly annotated with the VisitorFieldValidator, the annotations
correctly fire regardless of object depth.  This also works with Spring
managed objects (although I would need to verify our proxy implementation). 
So in the example originally cited, the Action class had a getCustomer
method which used the VisitorFieldValidator.  Placing the
VisitorFieldValidator annotation on the getAddress method on the Customer
allowed annotations defined on attributes of the Address object to properly

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message