title: Wicket Form with DropDownChoice with Enum and CompoundPropertyModel
body: <p>I have a problem with a Java Wicket Form with a dropdownchoice like this:</p>
  
  <pre><code>public class SomePage extends WebPage { 
      public SomePage () {
          CompoundPropertyModel&lt;SomeBean&gt; properties = new CompoundPropertyModel&lt;SomeBean&gt;(new SomeBean());
          Form&lt;SomeBean&gt; form = new Form&lt;SomeBean&gt;("SomeBeanForm", properties) {
          //override on submit
              };
          form.add(new DropDownChoice&lt;MyEnum&gt;("myEnum", Lists.newArrayList(MyEnum.values()));
          add(form);
      }
  }
  </code></pre>
  
  <p>SomeBean is simple like so:</p>
  
  <pre><code>public class SomeBean {
      private MyEnum myEnum;
      // Getter, Setter
      public SomeBean(){ 
      }
  }
  </code></pre>
  
  <p>And MyEnum is:</p>
  
  <pre><code>public enum MyEnum { 
      CHOICE1("1"), 
      CHOICE2("2");
      private String id;
      public MyEnum(String id) {
          this.id=id;
      }
      //some methods to get/set/display id
  }
  </code></pre>
  
  <p>My question is how do I set the enum in the bean using a CompoundPropertyModel? I get an exception like:</p>
  
  <pre><code>Could not convert value: CHOICE1 to type: MyEnum Could not find compatible converter.
  </code></pre>
  
  <p>This is caused by the face that it doesn't know how to convert anything to a MyEnum object, it requires a converter which is easy to create, but is how do I set a converter for a PropertyModel created by the CompoundPropertyModel?</p>
  
  <p>Thanks for any help!</p>
  
  <p><strong>--Edit--</strong></p>
  
  <p>It was a wrong import for the enum, the bean and the dropdownchoice used different enums with the same name. This code works. </p>