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 JSF bean methods 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 "JSF bean methods" Watch "JSF bean methods" New topic
Author

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?

Regards
Zein
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

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
Hi,

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
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.

 
jQuery in Action, 2nd edition
 
subject: JSF bean methods
 
Similar Threads
MethodNotFoundException
Using Oracle sequence with JBOSS
for attribute of h:message
My Managed Bean don't go to the requestmap.
selectManyCheckbox