I have a project called MyJSF, when deploy user will fill their information but appear an error , I don't know how to slove this problem, help me repair them
/User.xhtml @20,81 value="#{userBean.getUser}": Property 'getUser' not found on type ManagedBean.UserBean
here are code of
JSF Managed Bean
package ManagedBean;
public class UserBean {
User curUser = new User();
public
String getUser() {
if (curUser.name.equals("") || curUser.city.equals("") || curUser.phone == 0 || curUser.age == 0) {
return "/Error.xhtml";
} else {
return "/success.xhtml";
}
}
}
and class User.java include getter and setter
package ManagedBean;
public class User {
String name;
String city;
int phone;
int age;
public User() {
}
public User(String name, String city, int phone, int age) {
this.name = name;
this.city = city;
this.phone = phone;
this.age = age;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPhone() {
return phone;
}
public void setPhone(int phone) {
this.phone = phone;
}
}