5 Replies Latest reply on Nov 6, 2009 6:54 PM by Don Samson

    c:forEach for multiple h:columns

    Ben Catherall Newbie

      Hi guys,


      I understand that for dynamic columns in an h:dataTable, one should use c:forEach.  Unfortunately I'm getting:



             javax.servlet.ServletException: Servlet execution threw an exception
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
               .....
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit




      My page looks like this:




              <h:dataTable var="line" value="#{order.lines}" styleClass="grid" rowClasses="r1,r2" cellpadding="3" cellspacing="0">
                  <h:column>
                      <f:facet name="header">Product</f:facet>
                      #{line.name}
                  </h:column>
                  <c:forEach var="b" value="#{branches}">
                      <h:column>
                          #{b.name}
                      </h:column>
                  </c:forEach>
              </h:dataTable>
      
      



      Am I missing something?


      Cheers- Ben