aspose file tools*
The moose likes JSF and the fly likes Backing bean to point to bean method and redirect page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Backing bean to point to bean method and redirect page" Watch "Backing bean to point to bean method and redirect page" New topic
Author

Backing bean to point to bean method and redirect page

tom davies
Ranch Hand

Joined: Apr 27, 2012
Posts: 168
I have a form that writes form data to a file.
It uses a method in my managed bean to do this, and is invoked my clicking the submit button.

I now want to be able to redirect the page after the button has been clicked as well as call the method.
Would i do this within my managed bean or on the form page?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16058
    
  21

You would do this in the backing bean's action method. In the normal JSF scenario, the action method would return the name of a JSF navigation rule indicating the next page to be displayed (or null, to redisplay the current page). Starting with JSF2, implicit rules are also made for JSF view resource names so you can name the target view directly if your prefer.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Backing bean to point to bean method and redirect page