以下是我在 xhtml 中的代码:
<p:row rendered="#{abcBean.xyzmethod}">
在我的豆子里:
public boolean xyzmethod(){
String def = "ghi";
if(!def.equal("ghi"){
return false;
}
return true;
}
我的要求是,如果 xyzmethod 返回 false,我不想显示此行。但是在加载 xhtml 时出现错误:javax.el.PropertyNotFoundException:abcBean 没有属性“xyzmethod”。
我做错什么了吗?请帮忙!