Strange FacesException
Plz all,
I just try to develop first JSF app. But I've problem in it.
I've bean called UserNumber, it has one property called number, setter and getter.
When i run application this Exception appeared
"Can't set managed bean property: 'number'"
Why this ?
# 2
Thanks for reply,
Type object of what ?
yes, I defined it in faces-config.xml.
But i didn't mention that this bean has an operation called logon( ).
This is the code of UserNumber
public class UserNumber {
int number;
public UserNumber(){
}
public int getNumber() {
return number;
}
public void setNumber(int userNumber) {
this.number = userNumber;
}
public String logon(){
if(number == 9)
return "Success";
else
return "Fail";
}
}
# 3
With object type I mean, which kind of object is it?
Well, it appears that it's just the primitive int :)
Why have you definied it in the faces-config.xml? Do you have special purposes or didn't you just know what you're doing? If the last, then just remove it from the faces-config.xml. If the first, then you have to define it as Integer in the bean as well as the faces-config, otherwise it will be expected as a String.