It's not a secret anymore!*
The moose likes JSF and the fly likes Managed bean property gets displayed on a page, but then becomes null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Managed bean property gets displayed on a page, but then becomes null" Watch "Managed bean property gets displayed on a page, but then becomes null" New topic
Author

Managed bean property gets displayed on a page, but then becomes null

Vladimir Kroupa
Greenhorn

Joined: Dec 26, 2008
Posts: 28
Hi,
I have encountered a problem that is a mystery to me. I have a JSP page that prints out a property (payerAccountId) of a managed bean and then passes the same property to an EJB methodd. The property gets displayed without problems. Then I want to call a method from the same managed bean (whose only purpose is to call the EJB method and pass it the property payerAccountId as one if its parameters). The problem is that the property payerAccountId is null at the point when I need to pass it as a parameter to the EJB method.

The JSP page:


The method transfer() that gets called from the commandButton:


Faces-config.xml entry for this managed bean:


Does anyone have any idea why the property prints out, but becomes null after that?
I'm using JSF 1.2, JDK 1.6 and Glassfish V2.
BTW: is there any way how to debug the servlets that are created from JSPs?

Thank you for any input.
Vladimir
Vladimir Kroupa
Greenhorn

Joined: Dec 26, 2008
Posts: 28
I've found out where the problem was. The scope of the managed bean was request.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Managed bean property gets displayed on a page, but then becomes null
 
Similar Threads
JSF and REST urls
My JSF Portlet Tutorial
Using Oracle sequence with JBOSS
Trinidad-XMLMenuModel sub-elements not rendered
JSF, EJB3 target unreachable, returned null