This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes managed bean in JSF. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "managed bean in JSF." Watch "managed bean in JSF." New topic

managed bean in JSF.

samarthya saurabh

Joined: May 03, 2010
Posts: 17
I have defined a message bean in the JSF example I use to simply store the Login name and password values to be displayed on the navigated next page. My problem is even though there is no complication error. Only NULL gets set and returned. I have tried to debug and check if the setfunction is called, and it does but with null values and not with the actual text box values.

See below - faces-config.xml

and the login page looks like

and the navigated page is simply

I know I am wrong somewhere, but just seem to oblivious to it. Any help?

eve agostini
Ranch Hand

Joined: Nov 01, 2005
Posts: 43
You need to put the inputText components and the command button in the same form, otherwise the variables in the bean won't be set.
(as an alternative you may use a value change listener)
samarthya saurabh

Joined: May 03, 2010
Posts: 17
Don't get me started about those stupid light bulbs.
subject: managed bean in JSF.
Similar Threads
Beginners Querylogue!
Could not navigate from one page to another !!!
JSF Spring integration
faces-config not working
problem on JSF application