title: How to create a table with an unknown (at build-time) number of columns
body: <p>For simplicity, imagine that I have a list of lists.  I want to display a html table where there is a row for each element of the top-level list and each column in the row is an element of the child list.</p>
  
  <p>So</p>
  
  <pre><code>List(List(1,2,3), List(4,5,6), List(7,8,9))
  </code></pre>
  
  <p>would result in an html table that is displayed like this:</p>
  
  <pre><code>1     2     3
  4     5     6
  7     8     9
  10    11    12
  </code></pre>
  
  <p>Here's my attempt (the template)</p>
  
  <pre><code>    &lt;table&gt;
          &lt;lift:viewQuery.res2&gt;
              &lt;tr&gt;
              &lt;a:row&gt;
                  &lt;td&gt;&lt;a:num/&gt;&lt;/td&gt;
              &lt;/a:row&gt;
              &lt;/tr&gt;
          &lt;/lift:viewQuery.res2&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>And the relevant method in the snippet:</p>
  
  <pre><code>def res2(in :NodeSeq) : NodeSeq = {
    val data = List(List(1,2,3), List(4,5,6), List(7,8,9), List(10,11,12))
  
    def bindChild(child : List[Int],in :NodeSeq) = {
      child.flatMap(c =&gt; Helpers.bind("a", in,
                                      "num" -&gt; c.toString))
    }
    data.flatMap(childList =&gt; Helpers.bind("a", in,
                                           "row" -&gt; bindChild(childList, in)))
  }
  </code></pre>
  
  <p>When i go to the page it gives me the following errors:</p>
  
  <pre><code>error on line 28 at column 23: Namespace prefix a on row is not defined
  error on line 29 at column 31: Namespace prefix a on num is not defined
  error on line 34 at column 23: Namespace prefix a on row is not defined
  error on line 35 at column 31: Namespace prefix a on num is not defined
  ...
  </code></pre>
  
  <p>Any ideas on the best way to handle this?</p>