somewhat hackish, but you can accomplish this by using expressions : #params['attrib'] != null ? attrib in ('a','list','of','values')
(this is just an example stating that you can check for the existence of the variable in the parameter and then execute an expression like you normally would ) mleneveut wrote: > > Hi all, > > We have an Action redirecting to several JSP, depending on the customer. > But the forms of these JSP are different : some fields are added/removed > in some JSP. > > So the automatic validation fails for those fields not existing in some > JSP. > > We bypass the problem by copying the Action method to others Actions > (exactly the same code...). We have now one Action for one JSP, so we > could have different validation XML file name. But it is not very nice... > > Do we have another solution, like one Action, several JSP, one XML > validation file testing if the fields "exist" and if yes doing the field > validation ? Or setting a flag (hidden field) in the JSPs and doing > differents sets of validation depending of this flag ? > > Thanks for your tips. > > Regards, > > Michaƫl > -- View this message in context: http://www.nabble.com/-S2--Conditional-Validation-%28test-if-field-is-present-in-JSP%29-tf4465421.html#a12737286 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]