Martin Kindler wrote:

in my application I have a rather complex object to deal with. I have split
the process in several jsps (JSP1, ..., JSPn) using different ActionForms
(AF1, ..., AFm)...

2. merge all ActionForms to one big mega ActionForm
Pro: works
Con: no modularization; if I need to use one (partial) ActionForm in another
place, I have to take everything or replicate the needed part


You are talking about a wizard, right? IE, one logical form split over several JSP pages. In that case, I think you should just use one ActionForm with the data from all the JSP pages. I think the manual says something to the same effect. You can either:

1. make the ActionForm a session level form (see http://www.ajug.org/archive/ajug-members/10203/msg00066.html)
2. (or) make the ActionForm request level, in which case all your JSP pages must have hiden fields representing the data that has already been input on the previous JSP pages.


I'm not sure how to do the forwarding from one JSP page to the next page (preserving the contents of the partially filled ActionForm). Do you need to write a dummy Action for each JSP page, or can you/should you forward directly from one JSP page to the next one, like this? Try it out and let me know, if you can.

       <action
           path="/wizardPage1"
           name="wizardForm"
           forward="/wizardPage2.jsp"
       </action>
       <action
           path="/wizardPage2"
           name="wizardForm"
           forward="/wizardPage3.jsp"
       </action>

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to