If you want different types of validation to be performed before the Action
is executed, then assuming you are using the Struts Validator I recommend
that you :
1) ensure your Forms extend from ValidatorActionForm,
2) Create separate ActionMappings for each type of validation you want to
perform (each ActionMapping uses the same Action class).
3) Create the various validation specifications in validation.xml, each
keyed to the new ActionMappings.

William



----- Original Message ----- 
From: "Can Gencer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 05, 2004 9:10 PM
Subject: Multiple input forms -> one action -> one validator, how?


> Hello,
>
> I have multiple forms that point to the same action. It is not a
> multipage form, it is done as different types of searches done on
> different pages) and I would like to validate the forms individually
> using the validate() method on the form bean. However, I am required to
> define an input= parameter for the action for the validation, and since
> the input pages can be different.
>
> I can solve this problem by having a different action name for each
> search page and make them point to the same action class, but is there a
> nicer solution for this?
>
> Thanks,
> Can
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to