Wendy, But having different actions in struts-config. how would I call them in my jsp html:form ? because right now I have only one action in jsp <html:form action="myAction"> and then for each button i have property="method".. in jsp
in struts-config for this action mapping I have parameter="method" Did I miss anything in here? Thanks, --- Wendy Smoak <[EMAIL PROTECTED]> wrote: > From: "Vicky" <[EMAIL PROTECTED]> > > > My action class extends LookupDispatchAction, > which > > has different methods in it. In struts-config.xml > i > > have parameter method as we all know. My problem > is; > > in my validation.xml i do have to perform > different > > validations for different methods, how do I > > distinguish or find out which method is called to > > perform validation for that method only? > > Because you're using DynaValidator_Action_Form, the > framework will match up > the <action> 'path' attribute from struts-config.xml > with the <form> 'name' > attribute from validation.xml. > > I do it by having different URL patterns mapped to > the same > LookupDispatchAction using the same > DynaValidatorActionForm. > > In the <action> tag, only the 'path' and 'input' > differ (so > 'getInputForward()' works, no matter which path you > came in with, you go to > the right form-- it's a four-step wizard.) > <action > path="/denRegister" > type="edu.example.RegisterAction" > name="registerForm" ... > input="den.register.step1"> ...</action> > <action > path="/denRegister3" > type="edu.example.RegisterAction" > name="registerForm" ... > input="den.register.step3"> ...</action> > > Then in validation.xml, you use the path for the > form "name" (which is > slightly confusing...): > <form name="/denRegister"> ... </form> > <form name="/denRegister3">... </form> > > And then you can have different fields validated for > different paths, even > though it's the same Action and the same Form. All > my forms are POSTed, so > I wouldn't have had ?parameter=someText in any case. > > HTH, > -- > Wendy Smoak > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]