title: How to set value on the `path` attribute of a spring form `select` element?
body: <p>I'm working on a java web project based on springmvc.</p>
  
  <p>On one page, a html source snippet is as below:</p>
  
  <pre><code>&lt;form:select id="goodSelectId" path="goodId" items="${goodsList}"
        itemLabel="name" itemValue="goodCode"&gt;
        &lt;form:option value=""&gt;select the product&lt;/form:option&gt;
  &lt;/form:select&gt;
  
  
  &lt;form:checkbox path="flag" id="flag" value="1"
        onchange="change(this, 'goodSelectId')"/&gt;  
  </code></pre>
  
  <p>related jquery function ：</p>
  
  <pre><code>    function change(self, targetId) {
          if ($(self).is(':checked')) {
              $("#" + targetId).val("");
              $("#" + targetId).attr("disabled", true);      
          }
          else {
              $("#" + targetId).attr("disabled", false);
          }
      }
  </code></pre>
  
  <p>When I tick the checkbox, I want to make the select element value null, and then disable the select element.</p>
  
  <p>"disable" is Ok, but <strong>the value "" can't be set to  <code>path</code> of select:form.</strong></p>
  
  <p>That is:</p>
  
  <p>1) if I USE select drop-down to choose a option, the value can be passed to <code>path</code></p>
  
  <p>2) but if I set the value through the javascript function above, the value can't be passed to <code>path</code></p>
  
  <p>my question is: how can I pass the value set inside the javascript function to <code>path</code>?</p>