title: Why doesn't my Wicket Panel rerender after changing the default model?
body: <p>When the page with the MessagePanel first renders, the message and the approve link render perfectly. When I click the approve link, all the business logic works as desired, the <code>getNextMessage()</code> method returns the appropriate object, but the message panel does not update on the page in the browser. That is, the message body Label does not update.</p>
  
  <p>JPAEntityModel extends LoadableDetachableModel.</p>
  
  <p>What am I missing? And how do I fix it?</p>
  
  <pre><code>public class MessagePanel(String id, IModel&lt;Message&gt; messageModel) extends Panel {
    super(id, messageModel);
    add(new Label("messageText", new PropertyModel&lt;Message&gt;(getModelObject(), Message.BODY_FIELD)));
    add(new IndicatingAjaxFallbackLink&lt;User&gt;("approveLink", new JPAEntityModel&lt;User&gt; (getActiveUser())) {
      @Override
      public void onClick(AjaxRequestTarget target) {
        Message nextMessage = getNextMessage();
        MessagePanel.this.setDefaultModel(new JPAEntityModel&lt;Message&gt;(nextMessage));
        target.add(MessagePanel.this);
      }
  });
    setOutputMarkupId(true);
  }
  </code></pre>