You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emmanouil Batsis <Em...@eurodyn.com> on 2006/01/16 16:11:17 UTC

ValidatorActionForm and xdoclet?

Hi all,

Is anyone using xdoclet validator tags with ValidatorActionForms to 
generate different validation rule-sets per action? Is it even possible?

Thanks,

Manos

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


Re: ValidatorActionForm and xdoclet?

Posted by Marcelo Morales <ma...@redcetus.com>.
Hi

On Jan 16, 2006, at 11:11 AM, Emmanouil Batsis wrote:
> Hi all,
>
> Is anyone using xdoclet validator tags with ValidatorActionForms to  
> generate different validation rule-sets per action? Is it even  
> possible?
>

As far as i know it is not possible. And in my humble opinion it's  
not desirable.

I believe that each part of the code (class, method, etc) should be  
used to do just one thing. So using a single ValidatorActionForm to  
generate several validation rules seems too me a little bit tangled,  
since it might get hard to discern which validation rule goes to  
which action (at the setter doc comment).

You can code another ValidatorActionForm. Having one  
ValidatorActionForm with its validation attached (just one) keeps the  
design simple and easier to maintain. When coding it seems like  
unnecessary work when you think you can re-use a class'  bean  
patterns and just generate different validation rules, but this might  
get messy when maintenance time starts.

Regards

Marcelo Morales


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