title: Wicket onchange event returns the old value
body: <p>I am attaching an <strong><em>onchange</em></strong> event using the Wicket framework. The problem is that the old value keeps being returned as the event is fired (Which makes sense). <em>See code below</em>.</p>
  
  <p>What I want to do is get the "<strong><em>new</em></strong>" value of the select / dropbox after it has changed.</p>
  
  <p><strong>How can I achieve this?</strong></p>
  
  <pre><code>    dropdown.add(new AjaxEventBehavior("onchange") {
  
          /**
           *
           * @param target
           */
          @Override
          protected void onEvent(AjaxRequestTarget target) {
              Component component = getComponent();
              DropDownChoice dropdown = (DropDownChoice) component;
  
              String value = dropdown.getValue();//This brings back the old value…
          }
      })
  </code></pre>