You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent Berruchon <vi...@neo-logism.fr> on 2002/09/26 16:35:06 UTC

Distinct case in validate() with a form used in several page

  I'd like to use an actionFormBean with a few JSP form page.
But I'll have to treat different cases in the validate of my 
actionFormBean...
So in validate(), I was thinking about looking at the name of the input 
JSP with ActionMapping.getInput()
( or perhaps the name of the current action to choose the right case, /w 
getType() ).

Is it an acceptable way to do that?
I coulds also use an property of the formBean perhaps...

Thanks


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Distinct case in validate() with a form used in several page

Posted by Robert Taylor <rt...@mulework.com>.
I use the DynaValidatorActionForm and identify the validation routines in
the validation.xml by the action mapping and it works quite nicely. Is this
an acceptible way? It works well for me.

This is essentially what you would be doing except you will have some logic
in the form which determines which routines get called.


robert

> -----Original Message-----
> From: Vincent Berruchon [mailto:vincent.berruchon@neo-logism.fr]
> Sent: Thursday, September 26, 2002 10:35 AM
> To: Struts Users Mailing List
> Subject: Distinct case in validate() with a form used in several page
>
>
>   I'd like to use an actionFormBean with a few JSP form page.
> But I'll have to treat different cases in the validate of my
> actionFormBean...
> So in validate(), I was thinking about looking at the name of the input
> JSP with ActionMapping.getInput()
> ( or perhaps the name of the current action to choose the right case, /w
> getType() ).
>
> Is it an acceptable way to do that?
> I coulds also use an property of the formBean perhaps...
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>