All, I have a multi-page flow and I am using a DynaValidatorForm to store all my form info.
At the end of the flow, there's a "confirmation" page where the user can check out all of the information entered during the previous several pages. They have the opportunity to go back to each page (via a link) and change the data on those pages individually. If a user goes back, changes some text in a text box (for example), and then chooses the CANCEL button, the form is submitted, and the DynaValidatorForm is filled with the changed data. This is non-ideal, as I want the updated data to be discarded (since the user hit CANCEL). The obvious solution is to save a copy of the form bean before such a page is displayed (say, in the session), and then, if the user hits CANCEL, to resurrect that form bean. The question is: how should one bring back that bean? Struts provides the form bean object to each Action, so it's easy to get a reference to it, clone it, and shove it in the session as a backup copy. But, there's no API-happy way to put it back if I want to, is there? It looks like the only option I have is to push that form bean into the session with a known name. Since I know the "name" of the form, I can just use that, but it means having to hard-code the name of the form into my action. Is there a better way? Is there a way to get the "name" of the currently active form? Thanks, -chris
signature.asc
Description: OpenPGP digital signature