title: Grails request parameter type conversion
body: <p>In my Grails app, I need to bind a request parameter to a <code>Date</code> field of a command object. In order to perform the String-to-Date conversion, one needs to register an appropriate <a href="http://java.sun.com/javase/6/docs/api/java/beans/PropertyEditor.html?is-external=true" rel="nofollow noreferrer">PropertyEditor</a> in <code>grails-app\conf\spring\resources.groovy</code></p>
  
  <p>I've added the following bean definiton:</p>
  
  <pre><code>import org.springframework.beans.propertyeditors.CustomDateEditor
  import java.text.SimpleDateFormat
  
      beans = {
          paramDateEditor(CustomDateEditor, new SimpleDateFormat("dd/MM/yy"), true) {} 
      }
  </code></pre>
  
  <p>But I'm still getting an error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Could not parse date: Unparseable date: "04/01/99"]
  </code></pre>
  
  <p>I think there's probably just something wrong with the way I've defined the bean, but I've no idea what?  </p>