JSF/IceFaces条件呈现
我正在使用Icefaces有条件地渲染组件,但它无法拾取布尔值: BeanCode:JSF/IceFaces条件呈现,jsf,icefaces,el,Jsf,Icefaces,El,我正在使用Icefaces有条件地渲染组件,但它无法拾取布尔值: BeanCode: public boolean isEmpty(){ return true; } public int getCount(){ if (isEmpty()){ return 0; } return 1; } IceFaces <ice:panelGroup rendered="#{c
public boolean isEmpty(){
return true;
}
public int getCount(){
if (isEmpty()){
return 0;
}
return 1;
}
IceFaces
<ice:panelGroup rendered="#{coverage.empty}"> //this doesnt work
<ice:panelGroup rendered="#{coverage.count==0}"> //this does work
public boolean isEmpty(){
返回true;
}
public int getCount(){
if(isEmpty()){
返回0;
}
返回1;
}
冰面
//这不管用
//这确实有效
错误消息:
分析时出错:#{coverage.empty}
为什么IceFaces不能识别布尔值?事实证明,在faces中空是一个保留字。正如您所说,
空在表达式语言中是一个保留字。它确实是一个操作员
它测试一个元素是null
还是空的(例如,如果您的元素是字符串
,它测试他的值是null
还是”
)
你可以找到许多EL的例子