• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

back button

 
greenhorn
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the good way to implement back button?

one is history.go(-2), it looks good at first go. but there is an issue here:

it just shows the back page from browser history. this is what it is supposed to do.

but consider this scenerion:



assume there is a form and submit button on above page. now what happens is, in case of any invalid form field, we set error attribute to request, and we forward request to same page, and since request attribute is set, we will get this error message.

now user correct the form and submit again. this time no error so user go to next page. now on this next page there is a back button. if user clicks on it user will see the previous page with error. this is definitely wrong.

any suggestion here?
[ November 07, 2008: Message edited by: pooja jain ]
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could consider using to prevent caching of page:



Please see: http://www.theserverside.com/discussions/thread.tss?thread_id=11078
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satya Maheshwari:
You could consider using to prevent caching of page:



Please see: http://www.theserverside.com/discussions/thread.tss?thread_id=11078



yes.. it is good. also maintain the session according to your needs
 
reply
    Bookmark Topic Watch Topic
  • New Topic