2014-12-03 66 views
0

我正在使用JSTL 1.1.2和標準Jar 1.1.2。 c:forEach標記不會呈現任何值。我還檢查了它是否具有值「#{workflowTargetStepSelect.selectedIndex}」。它有2個值。但是下拉菜單顯示了我的空白。c:foreach標記不呈現

  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> 
+0

刪除#號並放$標記 – 2014-12-03 08:44:50

回答

0

你可以試試這個,

 <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

+0

你試過這個嗎? – 2014-12-05 22:58:47