jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes JSF bean methods 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 "JSF bean methods" Watch "JSF bean methods" New topic

JSF bean methods

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Hi guys,

I have a bean with two methods (in question), on My front JSF page I can click 2 buttons,

Each calls a different method in the same bean, the bean is off session scope.

The second button manipulates some varibles, which should be refelected in JSF, however the second bean in my code seems to be 'unresponsive'.

Where could the problem be??

Is my approach correct, or should each button have a different backing bean?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959

Check the method signature. It should be:

public String newGame() {

If it doesn't match, nothing happens.

Customer surveys are for companies who didn't pay proper attention to begin with.
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245

I've had a look at the method signiture, it is as stated

Both the methods (procees and newGame - as stated in the first post) are in the same bean, and both return strings.

Could it be the faces-config.xml? Does anyone else do use this method, i.e. one JSF page refers to two or more methods in the same bean???

Thanks for your thoughts
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Might I add to the above that both the buttons, are in the same form, calling mthods in the same bean, the first button works, the second button dooesnt work, ive checkd the method signitures and they are correct.

I agree. Here's the link: http://aspose.com/file-tools
subject: JSF bean methods
Similar Threads
My Managed Bean don't go to the requestmap.
Using Oracle sequence with JBOSS
for attribute of h:message