Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Going back to the previous page

 
Ramesh Etta
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I want to place a BACK button in my jsf page that will take to the previous page what i had viewed.

Is there any tags or code that will do this.
please send me the code or an example

Thanks and Regards
 
Alberto Dousdebes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U can use a navigation case. In faces-config define a new one.

page 1 <------- "back" ------------ page 2

bye!
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can simply use javascript for this. history.forward(-1)

Please google it I m not sure about this. Give this on onclick event.
 
Ketan Jambhekar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try with the UIViewRoot object.
You can store the UIViewRoot for the first page in a variable and then try setting it again in Context when the back button is called.
Once set you can call the renderResponse from Context.

To get the UIViewRoot :


when back button is called :





Thanks,
Ketan.
 
a phil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ketan,

that was a simple and sweet trick. i liked it.
 
Ramesh Etta
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
My requirement is i am calling a jsp from a subView and in the called jsp i need to place the back button which will take to the subView which is previews before.

I know to set the viewId, but how to set the subViewId.

Please reply, as it is an urgent requirement.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic