title: springMVC: view won't submit values to controller
body: <p>I've got the following setup:</p>
  
  <pre><code>public class MyController extends BaseFormController {
    public MyController() {
      setCommandClass(MyObject.class);
      setCommandName("object");
      setSessionForm("true);
    }
  
    @Override
    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)
          throws Exception {
      MyObject o = (MyObject) command;
      ...
    }
  </code></pre>
  
  <p>MyObject has a member of type MyOtherObject which, in turn, has a member <code>Set&lt;String&gt; foo</code>:</p>
  
  <pre><code>public class MyObject {
    ...
    MyOtherObject otherObject;
    ...
  }
  
  public class MyOtherObject {
    ...
    Set&lt;String&gt; foo = new HashSet&lt;String&gt;();
    ...
  }
  </code></pre>
  
  <p>and all corresponding setters and getters are implemented. Then I've got a view, written in jsp and:</p>
  
  <pre><code>&lt;form:form method="POST" action="" commandName="object" ...
  ...
      &lt;form:select path="otherObject.foo" multiple="multiple" size="4"&gt;
        &lt;c:forEach var="entry" items="${listOfItems}"&gt;
          &lt;option value="${entry.size}" &lt;c:if test="${!entry.enabled}"&gt;disabled&lt;/c:if&gt;&gt;${entry.name}&lt;/option&gt;
        &lt;/c:forEach&gt;
      &lt;/form:select&gt;
   ...
   &lt;/form:form&gt;
  </code></pre>
  
  <p>My goal is to map the <code>size</code>s of some entries in the list to the set <code>foo</code>.</p>
  
  <p>All other entries in the form are set to the values the user types in, so the overall syntax should be right. However when it comes to this multiple select form, which should be mapped to object.otherObject.foo, the controller acts as if no values whatsoever were ever provided in the view, i.e. even if I were to select multiple values from the box before hitting submit, the <code>command</code> object in the Controller still gets an empty otherObject.foo member.</p>
  
  <p>Any ideas what may be causing this?</p>
  
  <p>P.S. I also tried adding a <code>Set&lt;String&gt; foo</code> directly in MyObject and using it in the <code>path=""</code> of the view. It still didn't work out.</p>