• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Back" functionality in J2EE Application

 
Grant Morris
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're writing a web app that has a requirement for the users to be able to have some sort of "BACK" functionality to navigate through the application. We don't want to use the "Back" button on IE or the javascript function history.go(-1) because we don't want them to be able to submit the same information more than once. Plus we want to be able to control where they go while they're going back.
Suppose they search for a record, the results are brought back, they view a certain record, then modify the record, and then end up viewing the record again. If they select back from the last view, the application should go back to the list of records that were returned from the search (skipping all the modify stuff). Back again would go to the search page.
Any ideas on how to accomplish this? Thanks for the help.
 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using Struts, you could use the DispatchAction class in place of the Action class.
DispatchAction allows you to have a single class to handle all types of requests coming from a single html page. If the user hits a 'search' button from page "xyz", the DispatchAction class (that you extended) would call the "search" method. If the user hits the "back" button from page "xyz", the DispatchAction class executes the "back" method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!