title: PropertyModel Expression's Exception : org.apache.wicket.WicketRuntimeException: No get method defined for class:
body: <p>I used <code>PropertyModel</code> as the part of my <code>DropDownChoice</code> as following:</p>
  
  <pre><code>    List&lt;String&gt; choices = Arrays.asList(new String[] { "Library", "School Office", "Science Dept" });
      String selected = "Library";
  
      DropDownChoice&lt;String&gt; serviceDDC = 
              new DropDownChoice&lt;String&gt;("service",  new PropertyModel(this, "choices.0"), choices); 
  </code></pre>
  
  <p>Somehow I've got this exception thown:</p>
  
  <pre><code>caused by: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.samoo.tool.pages.CreatePrintingJob expression: choices
      at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:481)
      at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:332)
      at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:242)
      at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:95)
      at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:130)
      at org.apache.wicket.Component.getDefaultModelObject(Component.java:1724)
  
  ....
  </code></pre>
  
  <p>I know that there's something wrong with the expression. I've been trying different parameter inputs but it still doesn't work. Could anyone help?</p>