• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirecting to another page in Bean

 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wanted to do a redirect to another page in my bean. How do you do that in JSF? In JSP, I know it's something like this:



Some sample code will greatly help. Thanks in adcance.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setup a new navigation rule?
 
Brian Smith
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to elaborate a little more, Navigation in JSF is handled by navigation rules that are defined in faces-config.xml.

They look something like this.



outcome1 and outcome2 are Strings that are returned by a method that your commandButton, commandLink, etc (whatever causes a form submit) on your page are bound to via an action argument. If neither of the <from-outcome> conditions are met, the original page is redisplayed.


[ October 04, 2006: Message edited by: Brian Smith ]
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys. But I was actually looking for something like this:



I found it in older posts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic