Perhaps a call to the reset method in the ActionForm. Joe
-----Original Message----- From: Oguz Kologlu [mailto:ozkologlu@;optushome.com.au] Sent: Monday, 4 November 2002 5:08 PM To: Struts-User Subject: Clearing a form problem - bug or by design? Hi all, I know this question has been asked before - I think i know the reason why some people are having issues clearing a form - the same as I am. I don't know if the "problem" is really a bug, by design or if I'm going about it the wrong way but it has been driving me nuts - ( update: I've found a solution but read on if you have a better idea) Brief Description: When a form is submitted I save the actionform data to a DB, clear the actionform and forward to the same page ready for more data ( a sort of "Save and New" function ). When the actionform is redisplayed the form data "magically" re-appears. I've had a look at the struts source and it is re-populating the form from the request data in org.apache.struts.util.RequestUtils.populate( ... ). Is there any way to NOT repopulate the form? There is no problem if I forward to another page and come back to it but that's not really what I want. Am I going about this the wrong way or is there a simple ( or difficult ) solution. Simple Solution: set redirect to true: <forward name="newAction" path="/struts/newForm.do" redirect="true" /> If there is a better solution I would love to know since I would rather not have to redirect!!! Thanks Oz -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>