• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Method not found

 
Gynnad Paullussen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 49
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just fixed!

I removed the get, and that worked!
 
Daniel Katz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
}
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic