title: Wicket: Changing the text of an AjaxButton on submit
body: <p>I'm a noob to Wicket and trying to change the text of a AjaxButton on submit. So the idea is that the for the first time the page loads, the user sees an AjaxButton labeled  e.g. "1", after clicking the button, the label of the button changes to "2" and after the next click to "3" and so on...This can't be hard, but as I said, I'm a noobie when it comes to wicket. All help appreciated!</p>
  
  <pre><code>form.add(new AjaxButton("ajax-button", form)
      {
          @Override
          protected void onSubmit(AjaxRequestTarget target, Form&lt;?&gt; form)
          { //how to change Button label here?
           }
  </code></pre>
  
  <p>}</p>