渲染在dataTable primefaces JSF中不起作用

时间:2015-10-01 14:20:18

标签: jsf primefaces

我在jsf上的代码中有4个ifs的问题。我必须检查3个参数,当它正常时显示相应的消息。为什么它不起作用?在dataGrid中,它适用于c:when

<h:outputLabel value="#{msg.deleted}" class="delete" rendered="#{((!advertisement.isStarted) and (!advertisement.isActive) and (!advertisement.isFinished))}"/>
<h:outputLabel value="#{msg.done}" class="done" rendered="#{((advertisement.isStarted) and (!advertisement.isActive) and (advertisementisFinished))}"/>
<h:outputLabel value="#{msg.realize}" class="realize" rendered="#{((advertisement.isStarted) and (advertisement.isActive) and (!advertisement.isFinished))}"/>
<h:outputLabel value="#{msg.open}" rendered="#{((!advertisement.isStarted) and (advertisement.isActive) and (!advertisement.isFinished))}"/>

所有时间我都不理解BalusC的解决方案

我有:

public boolean isIsActive() {
    return isActive;
}

public void setIsActive(boolean isActive) {
    this.isActive = isActive;
}

public boolean isIsStarted() {
    return isStarted;
}

public void setIsStarted(boolean isStarted) {
    this.isStarted = isStarted;
}

public boolean isIsFinished() {
    return isFinished;
}

public void setIsFinished(boolean isFinished) {
    this.isFinished = isFinished;
}

0 个答案:

没有答案