title: Velocity table from Map<String, List<String>>
body: <p>I want to create a table within a Velocity template which gets it data from a <code>Map&lt;String, List&lt;String&gt;&gt;</code>. I tried it with nested <code>foreach</code> loops, but for some reason it didn't work (empty table even if data is present).</p>
  
  <p>Adding the data to my model         </p>
  
  <pre><code>model.put("downloaded", holder.getDownloadedFiles());
  </code></pre>
  
  <p>this adds a map as described above. </p>
  
  <p>my template:</p>
  
  <pre><code>&lt;table &gt;
  &lt;tr&gt;
      &lt;th style="width:150px"&gt;Subsystem&lt;/th&gt;
      &lt;th style="width:500px"&gt;Filename&lt;/th&gt;
  &lt;/tr&gt;
  
  #foreach( $system in $downloaded.keySet)
  #foreach($file in ${downloaded.get($system)})
      &lt;tr&gt;
      #if($foreach.count == 1) ##do only once
          &lt;td rowspan=$downloaded.get($system).size()&gt;$system&lt;/td&gt;
      #end
          &lt;td&gt;$file&lt;/td&gt;
      &lt;/tr&gt;
  
  #end
  #end
  &lt;/table&gt;
  </code></pre>
  
  <p>For now I would be happy, to have a table like this (key should be 1 cell over multiple columns):</p>
  
  <pre><code>key    value1
         value2
         value3
         value4
  key2   value1
         value2
         value3
         value4
  </code></pre>
  
  <p><strong>Do I access variables right and call methods properly?</strong></p>