Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean value doubt

 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic