You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Allen, Daniel" <Da...@kbcfp.com> on 2008/04/01 22:59:13 UTC

Inheritence of validator annotations

Hi, all.

I have a superclass where almost all of the subclasses will require
several validations for a particular field, but one subclass will use
some but not all of those validations. I know that you can add
@SkipValidation to avoid all validators, but is there something that you
can use to mark a set() method as not using any of the validators on
overridden superclass methods?


Thanks,
~Dan Allen


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


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


Re: Inheritence of validator annotations

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Allen, Daniel wrote:
> Hi, all.
>
> I have a superclass where almost all of the subclasses will require
> several validations for a particular field, but one subclass will use
> some but not all of those validations. I know that you can add
> @SkipValidation to avoid all validators, but is there something that you
> can use to mark a set() method as not using any of the validators on
> overridden superclass methods?
>
>
> Thanks,
> ~Dan Allen
>
>   

I don't think such an annotation exists. It sounds like a useful 
enhancement.

Do you know whether the algorithm gives precedence to the first 
encountered occurrence (subclass), the last encountered (superclass) or 
merges all occurrences?  I suspect it is the last case but don't recall 
exactly.  If that's the case it's not a trivial fix.


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