File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How to add and get attributes in managed beans? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to add and get attributes in managed beans?" Watch "How to add and get attributes in managed beans?" New topic
Author

How to add and get attributes in managed beans?

Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
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...


SCJP 1.5, SCWCD 1.4, Next... SCBCD5
A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
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

Joined: Mar 20, 2007
Posts: 135
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

Joined: Sep 27, 2004
Posts: 114
Can you post your JSP code and your action method.
Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
Thank you so much for your concern...

I got my Mistake...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add and get attributes in managed beans?
 
Similar Threads
How get session mb in POJO?
Accessing jsf bean from another jsf bean
Correct way to assign a value to a managed bean from a class?
Obtaining an instance of a Managed Bean declared with Application Level Scope
JSF backingbean value is null always.