汽车.java
@ManagedBean
@ViewScope
public class Car{
private List<Wheel> wheels;
@PostConstruct
public void init(){
wheels = new Arraylist<>();
}
public void setWheels(List<Wheel> wheels){
this.wheels = wheels;
}
public List<Wheel> getWheels(){
return wheels;
}
}
测试页.xhtml:
<h:form>
<p:selectOneMenu value = "#{car.wheels}">
<f:selectItems ... />
</p:selectOneMenu>
</h:form>
呈现页面时显示 javax.propertyNotFoundException on#{car.wheels}
当我将轮子的名称更改为 c 时,页面被正确呈现 这个异常发生了很多而不知道问题我错过了什么