aspose file tools*
The moose likes JSF and the fly likes Bean value doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Bean value doubt" Watch "Bean value doubt" New topic
Author

Bean value doubt

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
I have a bean set in the first page.



And I am able to display the value when I navigate to the next page as below:


When I try to display this value in the third page as below:
, this value is NULL.

My bean scope in the faces.xml files is as below:



I can't change the scope as tehre are many beans in that class and have used usual getter and setter method. Please let me know how to display the UserBean.selectRun value in the third page?
Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
Hi
I could do it by changing the scope to session from request.


But how to flush or reset the values and regain the original values if cancel button is pressed? Thanks.
[ September 18, 2008: Message edited by: Gopu Akraju ]
Sath Side
Greenhorn

Joined: Sep 16, 2008
Posts: 4
If I correctly follow, can you just set UserBean.selectRun to the original value in the reset or cancel action in your backing bean?
Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
Hi Thanks Sathe,
I could find a way to reset all the bean value by invalidating the session as below. Might be useful for others too and hence I am posting it.



I added these code under cancel command button. And it works fine by resetting the bean values.
 
jQuery in Action, 2nd edition
 
subject: Bean value doubt