Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 为什么没有产出?_Java_Jsf 2_Jstl - Fatal编程技术网

Java 为什么没有产出?

Java 为什么没有产出?,java,jsf-2,jstl,Java,Jsf 2,Jstl,如果我删除标记,它将显示findByClass中的所有项目。 如何使用或是否有其他方式显示事件ID <ui:repeat value="#{eventsController.findByClass}" var="item"> <c:if test="${item.eventId==10}"> <h:outputText value="${it

如果我删除
标记,它将显示
findByClass
中的所有项目。 如何使用
或是否有其他方式显示
事件ID

   <ui:repeat value="#{eventsController.findByClass}" var="item">
                            <c:if test="${item.eventId==10}">
                                <h:outputText value="${item.eventName}"></h:outputText>
                                <p></p>
                        </c:if>
                        </ui:repeat>

试试这个

<ui:repeat value="#{eventsController.findByClass}" var="item">
    <h:outputText value="#{item.eventName}" rendered="#{item.eventId==10}"/>
</ui:repeat>

facelet(
ui:repeat
)和JSTL(
c:if
)在不同的阶段进行评估,这会导致
c:if
中的条件始终返回false。

谢谢!它工作!!!我不能放弃你的投票权,因为我没有足够的声誉