JSF, How to set a property in a different page/backing bean and then navigate to that page?

Posted by kgrad on Stack Overflow See other posts from Stack Overflow or by kgrad
Published on 2010-04-23T15:00:25Z Indexed on 2010/04/23 15:03 UTC
Read the original article Hit count: 270

Filed under:
|

I am using JSF 2.0 and attempting to pass values between different pages in my App.

The setup is as follows: I have a page called userSelect that has a backing bean userSelectBacking. On this page I display a list of users that can be selected and submit using an h:commandbutton, when the page is submit the navigation goes to a userEdit page.

I have a page called userEdit, that has a backing bean userEditBacking which displays the information for a user and allows that user to be edited.

I would like to pass the user selected from the userSelect page into the userEdit page. I am currently using f:setPropertyActionListener to set the user in my userEdit backing from the userSelect page, however when I navigate to the userEdit page, it loses the information I set.

is there a way that I can pass the values between the two pages/backing beans?

thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf