Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html submit button javascript issue

 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic