emreturka
emreturka

Reputation: 876

Caused by: javax.el.MethodNotFoundException: Method not found

I couldn't see any thing.Here is my ManagedBean;

public class AralikKontrolEvent {

private String sayi;
private String mesaj="";

public String getMesaj() {
    return mesaj;
}

public void setMesaj(String mesaj) {
    this.mesaj = mesaj;
}

public String getSayi() {
    return sayi;
}

public void setSayi(String sayi) {
    this.sayi = sayi;
}

public void SayiKontrolEt(ActionEvent event){

    int a = Integer.parseInt(sayi);
    if(event.getComponent().getId().equals("gonder")){
        if(a>10){
            mesaj+="Sayı büyük";
        }else{
            mesaj+="Sayı küçük";
        }
    }

}

I called SayiKontrolEt method like below;

< h : commandButton value="Gönder" id="gonder" action="#{ake.SayiKontrolEt}"/>

But I get this error.I have looked lots of examples about jsf event.Everybody calls like I have called the method.What is the wrong which I haven't seen?

Upvotes: 0

Views: 9204

Answers (2)

Xavier Francisco
Xavier Francisco

Reputation: 26

You have two options:

  1. Remove ActionEvent from the method
  2. Or change action to actionListener

Upvotes: 1

britulin
britulin

Reputation: 310

Remove the ActionEvent argument from the method.

Upvotes: 0

Related Questions