RE: One form multiple Action mapping
Hey you can do some thing like this. c:if test=${TechnologyForm.action == 'CREATE'} c:set var=action value=/CreateTechnology.do / /c:if c:if test=${TechnologyForm.action == 'SUBMITTED'} c:set var=action value=/TechnologyList.do / /c:if c:if test=${TechnologyForm.action == 'MODIFY'} c:set var=action value=/UpdateTechnology.do / /c:if html-el:form styleId=Body action=${action} onsubmit=return submitForm() -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 8:49 PM To: 'Struts Users Mailing List' Subject: RE: One form multiple Action mapping Come to think of it more, since I want the submitted form to use different action mappings, I thought of using something like Scanfold's RelayAction which dispatches to different action mappings based on the parameter (in my case 'method'). On each action mapping I could set my required roles etc. and then have them all forwarded to the RegistrationAction for processing. This way I can distinguish between them and still process them in a single point (Action). What do you think? Erez -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 4:03 PM To: 'Struts Users Mailing List' Subject: RE: One form multiple Action mapping What about: html:form action=/Reg.do c:if ... html:hidden property=method value=dispatchMeth1 / /c:if c:otherwise html:hidden property=method value=dispatchMeth2 / /c:otherwise /html:form -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:04 AM To: 'Struts Users Mailing List' Subject: One form multiple Action mapping I have a registration form (RegForm) which based on the method/mode I want to direct it to a different action mapping in order to assign different roles or security restrictions. I have a single RegAction extending the DispatchAction class, with parameter 'method' as the dispatch parameter. I thought of maybe put a c:if .. and based on the 'method' put the correct html:form .. one. But then again maybe this will harm the javascript validation, cause the name of the form will be different. How can this be done? Registration.jsp: html:form action=/Reg.do?method=create ... /html:form Thanks, Erez - 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] - 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]
RE: One form multiple Action mapping
What about: html:form action=/Reg.do c:if ... html:hidden property=method value=dispatchMeth1 / /c:if c:otherwise html:hidden property=method value=dispatchMeth2 / /c:otherwise /html:form -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:04 AM To: 'Struts Users Mailing List' Subject: One form multiple Action mapping I have a registration form (RegForm) which based on the method/mode I want to direct it to a different action mapping in order to assign different roles or security restrictions. I have a single RegAction extending the DispatchAction class, with parameter 'method' as the dispatch parameter. I thought of maybe put a c:if .. and based on the 'method' put the correct html:form .. one. But then again maybe this will harm the javascript validation, cause the name of the form will be different. How can this be done? Registration.jsp: html:form action=/Reg.do?method=create ... /html:form Thanks, Erez - 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]
RE: One form multiple Action mapping
Come to think of it more, since I want the submitted form to use different action mappings, I thought of using something like Scanfold's RelayAction which dispatches to different action mappings based on the parameter (in my case 'method'). On each action mapping I could set my required roles etc. and then have them all forwarded to the RegistrationAction for processing. This way I can distinguish between them and still process them in a single point (Action). What do you think? Erez -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 4:03 PM To: 'Struts Users Mailing List' Subject: RE: One form multiple Action mapping What about: html:form action=/Reg.do c:if ... html:hidden property=method value=dispatchMeth1 / /c:if c:otherwise html:hidden property=method value=dispatchMeth2 / /c:otherwise /html:form -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:04 AM To: 'Struts Users Mailing List' Subject: One form multiple Action mapping I have a registration form (RegForm) which based on the method/mode I want to direct it to a different action mapping in order to assign different roles or security restrictions. I have a single RegAction extending the DispatchAction class, with parameter 'method' as the dispatch parameter. I thought of maybe put a c:if .. and based on the 'method' put the correct html:form .. one. But then again maybe this will harm the javascript validation, cause the name of the form will be different. How can this be done? Registration.jsp: html:form action=/Reg.do?method=create ... /html:form Thanks, Erez - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]