Pessoal,
Tenho esse ManageBean:
@ManagedBean(name = "autenticationBean")
@SessionScoped
public class AutenticationBean {
private String senha;
private String login;
UsuariosController use = new UsuariosController();
public AutenticationBean() {
}
public AutenticationBean(String senha, String login) {
this.senha = senha;
this.login = login;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public boolean getCheckPassword(){
return use.checkPassword(login, senha);
}
@Override
public int hashCode() {
int hash = 3;
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AutenticationBean other = (AutenticationBean) obj;
if (this.senha != other.senha) {
return false;
}
if ((this.login == null) ? (other.login != null) : !this.login.equals(other.login)) {
return false;
}
return true;
}
e a tela:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Sistema de Controle</title>
<h:outputStylesheet name="css/jsfcrud.css"/>
</h:head>
<h:body>
<h:form>
<center>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<h:panelGrid columns="2">
<h:outputLabel value="#{bundle.EditUsuariosLabel_alias}" for="login" />
<h:inputText id="login" value="#{autenticationBean.login}" title="#{bundle. EditUsuariosLabel_alias}"/>
<h:outputLabel value="#{bundle.EditUsuariosLabel_senha}" for="senha" />
<h:inputSecret id="senha" value="#{autenticationBean.senha}" title="#{bundle.EditUsuariosTitle_senha}" />
</h:panelGrid>
<p:commandButton action="#{autenticationBean.checkPassword}" value="INICIAR" ajax="false"/>
<p:commandButton action="http://intranet" value="SAIR" ajax="false"/>
</center>
</h:form>
<br />
<br />
<h:link outcome="/crud/usuarios/List" value="Show All Usuarios Items"/>
</h:body>
</html>
quando clico no botão Iniciar aparece o seguinte erro:
javax.el.MethodNotFoundException: /index.xhtml @43,108 action="#{autenticationBean.checkPassword}": Method not found: br.com.mda.bean.AutenticationBean@3.checkPassword()
alguém pode me dizer porquê ele não está encontrando o método?
Sds,
Maurijava.