• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add and get attributes in managed beans?

 
Damodar Mukherjee
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I was trying to get a value which is produced in a action_button of a backing bean. I stored the value in a property of that bean. The bean is in session scope and declared as a managed-bean in the faces-config.xml file, but I am unable to get the value in the next page.

Can any one suggest me how can I do that?

And also can I attach the value in the session variable?
How can I do that? Please suggest... Thank you in advance...
 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post some code how you are trying to get the value on page 2?
On page 2, you can see the property by simply doing value = "#{bean.property}". Make sure you have getters and setters for the property.
 
Damodar Mukherjee
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has proper getter and setter methods, and the value set in the faces-config.xml file are coming in value=${bean.property}
but the value i set in run time are not coming...!!!
 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your JSP code and your action method.
 
Damodar Mukherjee
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for your concern...

I got my Mistake...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!