-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chetan,
Chetan Pandey wrote: > To avoid this problem I introduced the following > request.getSession().setAttribute("eventForm", new EventForm()). If you are using Struts form beans, it might be better to blank the existing bean instead of creating a new one. Something like this: EventForm ef = (EventForm)form; ef.setFoo(null); ef.setBar(null); // etc. > I go to the form page and then click add. It goes to the Preview page. > Everything shows perfectly. Now I click on the Back Button. Lo and Behold > !!!!! The Add Fields are all empty. What browser are you using? Is your setup action being executed again, or is the browser serving the page from the cache? If the browser is not contacting the server, there's nothing you can do. (Actually, that's not true... if you are using javascript to do some funny things with the form, submission, etc., then you are likely causing your own problems. If, however, your form is standard then the browser /should/ be keeping the form data there if you do a SUBMIT followed by a BACK). If the browser /is/ contacting the server, then you need to look at what is happening in your action. For instance, if the above code is running, then /of course/ you are ending up with a blank bean. One way around this would be to put an action /in front/ of the editing action that blanks any existing form bean and then redirects (not forwards) to the editing action (which does /not/ blank the bean). In this case, you'll get a fresh bean for editing, but pressing BACK will result in the user returning to the "edit" action instead of the "blank-and-then-edit" action. Of course, if the user presses BACK twice, then you'll get a blank bean again. ;) Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFo8Iu9CaO5/Lv0PARAtAHAJ9RkZfhNyjOdMttiFmuaO9m7TW74ACeLKxB jStpytMzn+2l6dPLELV//lo= =qP9A -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]