File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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: 17421

Check the method signature. It should be:

public String newGame() {

If it doesn't match, nothing happens.

An IDE is no substitute for an Intelligent Developer.
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:
subject: JSF bean methods
It's not a secret anymore!