This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum 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
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "managed bean in JSF." Watch "managed bean in JSF." New topic
Author

managed bean in JSF.

samarthya saurabh
Greenhorn

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?


Samarthya
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
Greenhorn

Joined: May 03, 2010
Posts: 17
Thanks!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: managed bean in JSF.
 
Similar Threads
Beginners Querylogue!
faces-config not working
JSF Spring integration
Could not navigate from one page to another !!!
problem on JSF application