It's not a secret anymore!*
The moose likes JSF and the fly likes Method not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Method not found" Watch "Method not found" New topic
Author

Method not found

Gynnad Paullussen
Ranch Hand

Joined: Jan 26, 2011
Posts: 49
Hi,

I'm getting this error, but I don't now why.. Who can help me?

Error - javax.el.MethodNotFoundException: /Login.xhtml @17,114 action="#{controllerBean.showLogin}": Method not found: Beans.controllerBean@342c15.showLogin()


Login.xhtml


controllerBean (showlogin method)
Gynnad Paullussen
Ranch Hand

Joined: Jan 26, 2011
Posts: 49
Just fixed!

I removed the get, and that worked!
Daniel Katz
Greenhorn

Joined: Dec 11, 2011
Posts: 1
I had the same problem, this is my solution:

@ManagedBean
@SessionScoped
public class DepartmentMB {
boolean createNewDepartment = false;
...
}
I want to have a <h:commandLink value="create new department" action="#{departmentMB.createNewDepartmentChange()}"/> that would only change the boolean value to opposite and according to it I would render or not a form.
<h:panelGroup rendered="#{departmentMB.createNewDepartment}">....</h:panelGroup>

this way it doesn't work:
//this is ok
private boolean createNewDepartment = false;
//this is ok
public boolean isCreateNewDepartment(){
return this.createNewDepartment;
}
//this is wrong
public void setCreateNewDepartmentChange(boolean b) {
createNewDepartment = !createNewDepartment;
}

Then I removed the parameter, the set and the first letter must be small.

public void createNewDepartmentChange() {
createNewDepartment = !createNewDepartment;
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Method not found