Reputation: 876
I want to call a method from managedbean in jsf but I am getting the same error.Before I didn't get this error.Here is my method and calling in xhtml.
public String veriSil(Personel personel){
msb.baglan();
String sonuc="";
String sql = "DELETE FROM jsfapp.personel WHERE ad='"+personel.getAd()+"' AND soyad='"+personel.getSoyad()+"'";
try {
PreparedStatement pstmt = (PreparedStatement) msb.getConnection().prepareStatement(sql);
resultSilme = pstmt.execute();
} catch (Exception e) {
e.printStackTrace();
}
if (!resultSilme) {
sonuc += personelad + " " + personelsoyad + " silindi.";
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(sonuc));
return null;
} else {
sonuc += "Silme işlemi yapılamadı!";
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(sonuc));
return null;
}
}
I called in jsf ;
<h:commandLink action="#{kmb.veriSil}" value="Sil"/>
I can not see an error.What is going wrong?
Upvotes: 0
Views: 87
Reputation: 31
It seems you are calling a method that expects an argument without specifiying the argument. Therefore the compiler cannot match your call to a method because the argument is part of the method's signature.
Upvotes: 3