The best solution I can suggest would be to use javascript to dynamically change the action of your form so that you submit to the action path which is configured for just the form bean you want. You could use MappingDispatchAction instead of LookupDispatchAction and have minimal code-rewriting.
If Javascript isn't an option, you could probably make something work with action chaining. Action chaining is not formally supported by Struts, but many people use it successfully anyway.
Joe
At 3:59 AM +0000 12/7/04, Marc wrote:
Hi there. Help a struts rookie pls.
I have successfully implemented a two step wizard like interface where I have A.jsp for the first step and B.jsp for the second step.
But now I need an ability to dynamically change the jsp file at the step 2 based on a field selection during step 1 ! In other words at step two I might need either B.jsp or C.jsp. All three jsp files post to the same action class but are processed by different methods(I use DispatchAction and different method names). My problem is the form bean class. Currently it has getters/setters for all three jsps and this is exactly what I do not want to do.
Is there a more elegant way of doing this ? Can I use different form beans and yet use the same action class ?
Thanks in advance.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]