title: Passing data from GSP to a controller in Grails
body: <p>I create a GSP page with controls depending on the rows in a database.<br>
  This depends on the value returned by the <code>&lt;g:each in="${Vehicles}" var="vehicle"&gt;</code>
  So, if there are 3 vehicles, 3 rows with text boxes will be generated. (The maximum can be 200)</p>
  
  <pre><code>&lt;g:form action="update" &gt;
        &lt;label for="SearchTerm"&gt;${term}&lt;/label&gt;
  
            &lt;g:each in="${Vehicles}" var="vehicle"&gt;
              &lt;tr&gt;
                       &lt;td&gt; &lt;label for="Name"&gt;${vehicle.name}&lt;/label&gt; &lt;/td&gt;
                       &lt;td&gt;&lt;g:textField name="${vehicle.id}.ModelNo" /&gt; &lt;/td&gt;
                       &lt;td&gt;&lt;g:textField name="${vehicle.id}.Year" /&gt; &lt;/td&gt;
              &lt;/tr&gt;
            &lt;/g:each&gt;
    &lt;td&gt; &lt;g:submitButton name="update" value="Update"/&gt;&lt;/td&gt;
    &lt;/g:form&gt;
  </code></pre>
  
  <p>How can I basically pass this value to my controller so that I can then save/update the data to the database. or Is there any easy way to achieve this scenario?</p>