Thanks for your response, I have rephrased my question as below: Please help!
Background ========== I have a class that extends the new MappingDispatchAction class . This class has two methods, namely getCustomer and updateCustomer. The corresponding mapping for each method are below: <action path="/getCustomer" type="com.fujimitsu.cargo.gen.CustomerAction" name="cargoForm" scope="request" validate="false" input=".customerDef.jsp" parameter="getCustomer"> <forward name="success" path=".customerDef.jsp" /> </action> <action path="/updateCustomer" type="com.fujimitsu.cargo.gen.CustomerAction" name="cargoForm" scope="request" validate="true" input=".customerDef.jsp" parameter="updateCustomer"> <forward name="success" path=".customerDef.jsp" /> </action> my jsp has three buttons, namelygetCustomer, updateCustomer and cancel. My question: ============ 1. In my JSP, what what should be the value of the ACTION attribute of html:form i.e. <html:form action="??????????"> (i.e. which mapping should be specified here)? 2. what should the code of the button for excuting a. getCustomer and updateCustomer method be? i.e. <html:submit ??????????????? b. cancel be i.e. <html:cancel ??????????????? Thank you. Thanks for your response, I have rephrased my question as above. > --- Michael McGrady <[EMAIL PROTECTED]> > wrote: > > If you would like a simpler, and more general, > > solution that does the > > same thing, try > > > http://wiki.apache.org/struts/StrutsCatalogFiveMultipleButtonSolutions > > > > . However, if you like MappingDispatchAction > > anyway, which I would find > > odd but you may find even, you can do whatever you > > like, but you have to > > generate the correct path with your button or > form. > > > > Michael > > > > O. Oke wrote: > > > > >If it is "/updateCustomer", it means I will have > to > > a > > >separate jsp for each mapping. This will defeat > > the > > >purpose of using MappingDispatchAction. It seems > > to > > >me that your suggestion is only applicable to > > >subclasses of Action, not MappingDispatchAction . > > > > > > > > >I am asking because I am using > > MappingDispatchAction > > >for my project. > > > > > >Thank you. > > > > > > --- Hubert Rabago <[EMAIL PROTECTED]> wrote: > > > > > > > > >>1. The action attribute of the form tag should > > >>point to the action > > >>that will process the form upon submission. In > > your > > >>case, it looks > > >>like it would be "/updateCustomer", but I'm just > > >>guessing. > > >> > > >>2. I usually just put <html:submit > > value="Submit"/> > > >>or "Save" or > > >>something similar there because I usually have > > only > > >>one submit button. > > >> If you're asking because you read something > about > > >>this button mapped > > >>to that method, that's LookupDispatchAction. > > >>MappingDispatchAction is > > >>a lot easier to deal with when it comes to > mapping > > >>methods, IMO. :) > > >> > > >>Hubert > > >> > > >>On Thu, 23 Sep 2004 15:26:56 +0100 (BST), O. Oke > > >><[EMAIL PROTECTED]> wrote: > > >> > > >> > > >>>Please help! > > >>> > > >>>I have a class that extends > MappingDispatchAction > > >>>class > > >>>. This class has, they are below: > > >>> > > >>> <action path="/getCustomer" > > >>>type="com.fujimitsu.cargo.gen.CustomerAction" > > >>>name="cargoForm" > > >>>scope="request" > > >>>validate="false" > > >>>input=".customerDef.jsp" > > >>>parameter="getCustomer"> > > >>><forward name="success" path=".customerDef.jsp" > > /> > > >>> </action> > > >>> > > >>> <action path="/updateCustomer" > > >>>type="com.fujimitsu.cargo.gen.CustomerAction" > > >>>name="cargoForm" scope="request" > > >>>validate="true" > > >>>input=".customerDef.jsp" > > >>>parameter="updateCustomer"> > > >>><forward name="success" path=".customerDef.jsp" > > /> > > >>> </action> > > >>> > > >>>My question: > > >>>1. In my JSP, what what should be the value of > > >>> > > >>> > > >>the > > >> > > >> > > >>>action attribute of html:form > > >>> i.e. <html:form action="??????????"> (i.e. > > >>> > > >>> > > >>which > > >> > > >> > > >>>mapping should be specified here)? > > >>> > > >>>2. what should the code of the button for > > >>> > > >>> > > >>excuting > > >> > > >> > > >>>getCustomer method be? > > >>> i.e. <html:submit ??????????????? > > >>> > > >>>Thank you. > > >>> > > >>> > > >>> > > >>> > > > >___________________________________________________________ALL-NEW > > > > > > > > >>Yahoo! Messenger - all new features - even more > > fun! > > >> http://uk.messenger.yahoo.com > > >> > > >> > > >>> > > >>> > > > >--------------------------------------------------------------------- > > > > > > > > >>>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] > > >> > > >> > > >> > > >> > > > > > > > > > > > > > > > > > > >___________________________________________________________ALL-NEW > > Yahoo! Messenger - all new features - even more > fun! > > http://uk.messenger.yahoo.com > > > > > > >--------------------------------------------------------------------- > > >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] > > > > > > > > > > ___________________________________________________________ALL-NEW > Yahoo! Messenger - all new features - even more fun! > http://uk.messenger.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]