aspose file tools*
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
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: 16014
    
  20

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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSF bean methods