title: jsf-arrayList of arrayList in JSF
body: <p>I have a ArrayList of ArrayList - I declare it in this way:</p>
  
  <pre><code>ArrayList&lt;ArrayList&lt;String&gt;&gt; queryResult=new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
  </code></pre>
  
  <p>Then I add a new element to array like this:</p>
  
  <pre><code>for(int i=1;i&lt;colNumber;i++)
  {
      queryResult.add(new ArrayList&lt;String&gt;(20));
  }
  </code></pre>
  
  <p>after that I add a value to elements of array:</p>
  
  <pre><code>while(r.next())
  {   
      for(int i=0;i&lt;colNumber;i++)
      {
          queryResult.get(i).add(r.getString(i));  
      }     
  }
  </code></pre>
  
  <p>But when I try to use it in DataTable tag I see nothing :(</p>
  
  <pre><code>&lt;h:dataTable value="#{polaczenieSQL.queryResult}" var="w"&gt;
            &lt;h:column&gt;
               &lt;f:facet name="head"&gt;typ&lt;/f:facet&gt;
               #{w[0]}
            &lt;/h:column&gt;
  </code></pre>
  
  <p>What I am doing wrong? How should I use this array in JSF?</p>
  
  <p>Ps this is my faces.config:</p>
  
  <pre><code>     &lt;managed-property&gt;
          &lt;property-name&gt;queryResult&lt;/property-name&gt;
          &lt;property-class&gt;java.util.ArrayList&lt;/property-class&gt;
          &lt;list-entries&gt;&lt;/list-entries&gt;
       &lt;/managed-property&gt;
  </code></pre>
  
  <hr>
  
  <p>I found first problem:</p>
  
  <pre><code>r.getString(i)
  </code></pre>
  
  <p>I added a </p>
  
  <pre><code>System.out.print("something")
  </code></pre>
  
  <p>after a loop but it doesn't want to print. </p>
  
  <p>When I change a variable 'i' and type 
  for example: 4  I see "something" on my console . Variable 'colNumber' is set to 5 (but my sql table have 7 columns and I use "select * from mytable" so I dont think that is a counter problem ).   </p>