You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by egetchell <er...@distributedlogic.com> on 2008/05/01 17:01:23 UTC

Re: Struts2.1: Is Validation Annotations on Nested Objects Supported?

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
fire.

-Eric
-- 
View this message in context: http://www.nabble.com/Struts2.1%3A-Is-Validation-Annotations-on-Nested-Objects-Supported--tp16852587p16993288.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org