混淆<c:if test =“”> </c:if>

时间:2013-05-31 15:53:03

标签: jsf jstl

我遇到了JSP <c:if test="">的问题。 <c:if test="true"><c:if test="false">按预期工作。但是下面的代码片段没有:

<p:dataTable value="#{orderMB.allAdTypes}" var="ad">
  <c:if test="ad.isNotFullPage()">
   <p:column headerText="Type">
     <h:outputText value="#{ad.typeToString}" />
   </p:column>
  </c:if>
   <p:column headerText="Name">
     <h:outputText value="#{ad.name}" />
   </p:column>
</p:dataTable>

我只看到一列;永远不会调用ad.isNotFullPage()。我已经尝试了test="#{ad.isNotFullPage()}test="${ad.isNotFullPage()}"test="#{ad.isNotFullPage}的所有组合(这最后希望ad.getIsNotFullPage()被调用。)

orderMB是@ManagedBean @ViewScoped。 orderMB.getAllAdTypes()返回List<AdType>AdType是@Entity @Table(name =“ad_type”)。

这是在Glassfish 3.1,JDK 1.7上运行。

0 个答案:

没有答案
相关问题