• Post Reply Bookmark Topic Watch Topic
  • New Topic

Another back button question.

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've searched here and found a couple references to back button but none of those seemed to do what I want.

Here is the scenario...I have a a button on a page that when it is clicked, I wish to have code run in the action method of the backing bean and then have the page be reset back EXACTLY as if you had coded a "history.back(); return false" in the onClik of the button.

Getting the action method called when the button is clicked is no problem, but how (without adding a new class or some sort of decorator) can you simply force the page to revert to the one you came from?

In other words, I want to mimic exactly what would happen if I were to us history.back which I cannot since I need code to be run in the action method of the backing bean.

Any idea?
[ November 07, 2005: Message edited by: Darrin Smith ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First thing that pops into my mind is you'd have to persist the page data that you came from and then navigate back to that page via your action on the other page, restoring the view from the persisted data.
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gregg Bolinger:
First thing that pops into my mind is you'd have to persist the page data that you came from and then navigate back to that page via your action on the other page, restoring the view from the persisted data.


That's what I ended up doing.

Thanks.
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Darrin,
I've been using following line of code to reset the values in my dataTabale(dt) on click of a button ...

JsfHelper.setSessionAttribute("seltaskForm t",result );
// result is List of values to be displayed within dt

u try to find out if we can do the same for entire form .
I mean Somthing like
JsfHelper.setSessionAttribute("seltaskForm",??? );

hope this serves the purpose .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!