title: Objects as input of a form in Play framework
body: <p>All the examples of models and forms of the Play framework (I use 2.0.4) use <code>String</code>, <code>int</code> or <code>Long</code> as attributes.</p>
  
  <p>However I have a model like this:</p>
  
  <pre><code>public class MyModel {
  
      @Required
      public String name;
  
      @Required
      public Date birthdate;
  
      @Required
      public MyClass someObject;    
  }
  </code></pre>
  
  <p>Now for the <code>name</code> I can simply use a <code>@inputText(...)</code> field in my form.</p>
  
  <p>For the <code>birthDate</code> I tried using an <code>@inputDate(...)</code> field in my form, but this just gives me an input field and whatever format of date I try to enter in the input field, it gets rejected. I also tried passing <code>'format -&gt; "dd/mm/yyyy"</code> to this field, without success.</p>
  
  <p>I don't even know how I can possibly enter a <code>MyClass</code> object for the form.</p>
  
  <ol>
  <li>How can I make the <code>@inputDate()</code> work?   </li>
  <li>Is it necessary to make
  every input a String/Int/Long and upon receiving those values in the controller to
  construct a <code>MyClass</code> object of them?</li>
  </ol>