title: g:select onchange with rest-url
body: <p>I want to select a language with a <code>&lt;g:select&gt;</code> tag and send the selection params to an action when the selection changes. (The param should be visible in the url of the opened view)</p>
  
  <p>I tried different variations of <code>&lt;g:form&gt;</code> and <code>&lt;g:select&gt;</code>:</p>
  
  <ol>
  <li><p><strong>Version creates the correct params, but doesn't create a rest url</strong>:</p>
  
  <pre><code>&lt;g:form name="selectLanguage"  &lt;b&gt;action='show' id="${mitarbeiterprofilInstance.id}" lang=lang&gt;
   &lt;g:select onchange="submit();"
    value="${profilInstance?.sprache?.sprache}"
    name="lang"
    optionKey="sprache"
    optionValue="sprache"
    from = "${mitarbeiterprofilInstance.profiles.sprache}" /&gt;
  &lt;/g:form&gt;
  </code></pre>
  
  <p>Params: <code>[lang:deutsch, id:3, action:show, controller:mitarbeiterprofil]</code></p>
  
  <p>url: <code>/mitarbeiterprofil/show/3</code> </p>
  
  <p>url should be <code>/mitarbeiterprofil/show/3/deutsch</code></p></li>
  <li><p><strong>Version adds the params to the url, but with the wrong action</strong>:</p>
  
  <pre><code>&lt;g:form name="selectLanguage"  id="${mitarbeiterprofilInstance.id}" lang=lang&gt;
    &lt;g:select onchange="submit();"
    value="${profilInstance?.sprache?.sprache}"
    name="lang"
    optionKey="sprache"
    optionValue="sprache"
    from = "${mitarbeiterprofilInstance.profiles.sprache}"  /&gt;
  &lt;/g:form&gt;
  </code></pre>
  
  <p>Params: <code>[lang:deutsch, id:3, action:index, controller:mitarbeiterprofil]</code></p>
  
  <p>url: <code>/mitarbeiterprofil/index/3/deutsch</code></p></li>
  <li><p><strong>Version chooses the right controller, shows the params in the url, but doesn't use the right parameter</strong>:</p>
  
  <pre><code>&lt;g:form name="selectLanguage"  id="${mitarbeiterprofilInstance.id}" lang=lang&gt;
    &lt;g:select onchange="submit(&lt;b&gt;action='show');"
    value="${profilInstance?.sprache?.sprache}"
    name="lang"
    optionKey="sprache"
    optionValue="sprache"
    from = "${mitarbeiterprofilInstance.profiles.sprache}"  /&gt;
  &lt;/g:form&gt;
  </code></pre>
  
  <p>params:<code>[lang:show, id:3, action:show, controller:mitarbeiterprofil]</code></p>
  
  <p>url: <code>/mitarbeiterprofil/show/3/show</code></p></li>
  </ol>
  
  <p>Does anyone else have another idea on how I might go about this?</p>