title: How to use a List as a Model Attribute in Spring?
body: <p>I have my Home controller like this:</p>
  
  <pre><code>    @RequestMapping("/")
      public ModelAndView welcome(@ModelAttribute("myValuesInRows") List&lt;String&gt; myValuesInRows,  ModelMap model) {
          List&lt;Spravochnik&gt; dropDown = spravochnikService.findAll("sprav_of_spravs");
          List&lt;String&gt; justValuesInRows = new ArrayList&lt;&gt;();
          for(Spravochnik sprav : dropDown) {
              for(List&lt;String&gt; vals : sprav.getValuesInRows()) {
                  for(String v : vals) {
                      justValuesInRows.add(v);
                  }
              }
          }
          for(int i=1; i&lt;justValuesInRows.size(); i+=2) {
              myValuesInRows.add(justValuesInRows.get(i));
          }
          model.addAttribute("myValuesInRows", myValuesInRows);
          return new ModelAndView("home", model);
      }
  </code></pre>
  
  <p>and my Home view has this Select I'm using:</p>
  
  <pre><code>&lt;f:form&gt;
  &lt;f:select path="myValuesInRows" items="${myValuesInRows}" name="tableName" id="tableName"&gt;
  &lt;/f:select&gt;
  &lt;/f:form&gt;
  </code></pre>
  
  <p>When I try to show it Spring shows this error:</p>
  
  <p><code>No primary or default constructor found for interface java.util.List</code>.</p>
  
  <p>I would like to connect my select to this List I'm passing, how is it done here?</p>