I have a enum named PersonType :
public enum PersonType {
AAA ("F"),
BBB ("J");
private final String id;
private PersonType(String id){
this.id = id;
}
public String getId() {
return id;
}
}
Person class :
public void setpersonType(PersonType tipoPessoa) {
this.des_tipoPessoa = tipoPessoa;
}
In my bean I have in init :
class named Pessoa setting the pesonType
pessoa.setpersonType(PersonType.BBB);
in my xhtml I have :
I got the such error :
javax.servlet.ServletException: Cannot convert J of type class java.lang.String to class myproject PersonType
what is the right way to compare #{pessoaMB.pessoa.des_tipoPessoa ne 'J'
Primefaces radio :
thanks in advance