4 Replies Latest reply on Jan 8, 2009 3:33 PM by Jan Groth

    foreach help

    Florian Bantner Newbie

      Hello forum,


      I'm not getting it. What's wrong here:



      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:c="http://java.sun.com/jsp/jstl/core"
           xmlns:h="http://java.sun.com/jsf/html">
      
      <body>
          foreach:
          <c:forEach var="xxx" begin="1" end="5">
              <h:outputText value="item: #{xxx}" />
          </c:forEach>
      </body>
      </html>
      



      results in:


      foreach: item: 
      



      no repetition. no error. nothing.


      (I need c:forEach so that I can iterate over a list and include different templates depending on the list item's values. This was just a test because my list iteration didn't work.)


      Thanks