【问题标题】:c:foreach tag not renderingc:foreach 标签不渲染
【发布时间】:2014-12-03 08:38:45
【问题描述】:

我正在使用 JSTL 1.1.2 和标准 Jar 1.1.2。 c:forEach 标记不呈现任何值。我还检查了它是否具有值“#{workflowTargetStepSelect.selectedIndex}”。它有 2 个值。但是下拉菜单对我来说是空白的。

          xmlns:c=http://java.sun.com/jsp/jstl/core

          <h:selectOneMenu value="#{workflowTargetStepSelect.selectedIndex}">
                 <c:forEach var="step" items="#{workflowTargetStepSelect.items}"                varStatus="loop">
                       <f:selectItem itemLabel="#{step.prettyNameForRoleType}" itemValue="#{loop.index}" />
                 </c:forEach>
          </h:selectOneMenu>  

【问题讨论】:

  • 去掉#号并放上$号

标签: c foreach tags jstl


【解决方案1】:

你可以试试这个,

        <c:forEach var="step" items="#{workflowTargetStepSelect.items}"  varStatus="loop">
            <h:selectOneMenu value="#{workflowTargetStepSelect.selectedIndex}">
                <f:selectItem itemLabel="#{step.prettyNameForRoleType}" itemValue="#{loop.index}" />
            </h:selectOneMenu>
        </c:forEach>

你也可以看看this question

【讨论】:

    猜你喜欢
    • 2012-03-29
    • 1970-01-01
    • 2015-01-22
    • 2010-11-30
    • 1970-01-01
    • 1970-01-01
    • 2023-03-09
    • 2011-09-17
    • 2016-10-01
    相关资源
    最近更新 更多