On page A click event I am adding page attributes to session. Upon clicking done on Page A action adds values to session and takes user to Page B. Now when user clicks browser back button and edits values on page A and clicks done it again adds new record with new values to session. How do I avoid/achieve this? Upon clicking back browser button I want to update the already added object from session but how my struts action will know/distinguish about this?
posted 10 years ago
I thought following code might be helpful. html:submit property= method on click=history back bean:message key=buttonback where, in back method of my LookupDispatchAction class I am deleting added record from the session so when user clicks done it should add new record. however since I have return null for this method it doesn't display previous page, I thought since I have onclick history back , this should work but its not working also I can't use return (new ActionForward(mapping.getInput())) in my action to return to previous page because this reads mapping from struts-config file to take me back and in my case I come from different action to this page. Any ideas?