title: Form processing with inheritance
body: <p>I have a model that can be described as follows:</p>
  
  <p><a href="http://aoeu.se/so/animal-dog-cat.png" rel="nofollow noreferrer">http://aoeu.se/so/animal-dog-cat.png</a></p>
  
  <p>(Extremely simplified. My actual classes have about ten-twenty more fields each.)</p>
  
  <p>I have the persistence all worked out and I'm now trying to create a form in which users should be able to create objects of these classes (dogs and cats).</p>
  
  <p>I would like it to look roughly as follows:</p>
  
  <p><a href="http://aoeu.se/so/new-animal-form.png" rel="nofollow noreferrer">http://aoeu.se/so/new-animal-form.png</a></p>
  
  <p>(I already have the HTML and the enabling / disabling of input fields implemented.)</p>
  
  <p>To <strong>my question</strong>: How do I best implement the form processing? I don't see how I can directly use PropertyModels and such since the type of model object depends on the first Dog/Cat choice.</p>
  
  <p>If Wicket guarantees that the order in which the fields are processed is the same as the order in which they appear in the web page, then I guess I could create the model object once the animal type input is processed (since it's the first form component), and let the remaining fields use a PropertyModel.</p>