aspose file tools*
The moose likes JSF and the fly likes Redirecting to another page in Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Redirecting to another page in Bean" Watch "Redirecting to another page in Bean" New topic
Author

Redirecting to another page in Bean

Eugene Abarquez
Ranch Hand

Joined: May 18, 2006
Posts: 211
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.


There's so much to learn in this industry, and not everybody has the necessary interest.
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
setup a new navigation rule?


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Brian Smith
Ranch Hand

Joined: May 20, 2005
Posts: 63
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

Joined: May 18, 2006
Posts: 211
Thanks guys. But I was actually looking for something like this:



I found it in older posts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirecting to another page in Bean