title: c:foreach inside h:datatable to show two dimensional array
body: <p>I am trying to use h:datatable tag to display values of two-dimensional int array. But cannot make it. Could help me with a solution? </p>
  
  <p>So my backing bean is:</p>
  
  <pre><code>public class MC {
  ...........
  
  public int[][] getAr() {
      return ar;
  }
  
  public int getColCount(){
      return ar[0].length;
  }
  }
  </code></pre>
  
  <p>I can display the array with code in foreach tag referring to the array size:</p>
  
  <pre><code>&lt;h:dataTable value="#{mC.ar}" var="dt"&gt;
  &lt;c:forEach var="fe" begin="0" end="#{mC.colCount-1}"&gt;
      &lt;h:column&gt;
          &lt;f:facet name="header"&gt;X&lt;/f:facet&gt;
              #{dt[fe]}
      &lt;/h:column&gt;
  &lt;/c:forEach&gt; 
  &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>But nothing is printed if I try to use variable from dataTable:</p>
  
  <pre><code> &lt;h:dataTable value="#{mC.ar}" var="dt"&gt;
   &lt;c:forEach var="fe" items="#{dt}"&gt;
      &lt;h:column&gt;
          &lt;f:facet name="header"&gt;XX&lt;/f:facet&gt;
              #{fe}
      &lt;/h:column&gt;
  &lt;/c:forEach&gt; 
  &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>Could you help me to make it work? Or perhaps you could suggest some better solution to display an array? Thank you</p>