This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
We have a scenario wherein after submitting the form an update operation takes place in the database and the user is displayed with the same page.
But this time, the form values have to be reset and displayed afresh so that the user can enter further values and add it to the database.
Looking at this consequence, the reset() method in the ActionForm has to be called explicitly as it is called after the form is submitted and before the bean is populated with the request parameter values. That is very fine. But what we need is the form has to be reset during the page loading the next time.
Can we call the reset method in the Form bean and invoke it in the Action class once our database updating operation is done? I think it is somehow not a better way as its like life cycle method which is supposed to be handled by the Struts framework.
Other alternative is to mimic the reset() method in a separate method and invoke it in the Action class which could clear the required fields.
What is the best way out of these two? is there any other better way to handle this scenario?
Thanks in advance! [ May 14, 2008: Message edited by: Raghavan Muthu ]