struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egetchell <eric.getch...@distributedlogic.com>
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
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


Mime
View raw message