title: Wicket - Showing a modal window with form components on AjaxSelfUpdatingTimerBehavior event does not populate user choices
body: <p>I have a situation where I am trying to display an input form on a Wicket 6 ModalWindow. </p>
  
  <p>Currently this is a very simple form with three radio buttons in a group on it for getting the thing working.</p>
  
  <pre><code>// in TestPanel.class, the content of TestDialog:
  protected void onInitialize() {
    super.onInitialize();
  
    RadioGroup&lt;Integer&gt; group = new RadioGroup&lt;Integer&gt;( "group", _model );
    getForm().add( group );
  
    group.add( new AjaxRadio&lt;Integer&gt;( "g1", Model.of( 1 ) ) {
  
      private static final long serialVersionUID = 1L;
  
      @Override
      protected void onInputChanged( AjaxRequestTarget target ) {
        System.out.println( getMarkupId() + " clicked, Input is now " + _model.getObject() );
      }      
    });
    // + 2 more other similar radio buttons..
  }
  </code></pre>
  
  <p>(AjaxRadio is just a Radio with an AjaxEventBehavior("onchange") added that finds the parent radiogroup and calls group.processInput followed by onInputChanged)</p>
  
  <p>If I show this dialog under normal circumstances (eg onClick on an AjaxLink) the dialog displays fine and the model is correctly updated.</p>
  
  <pre><code>actionsForm.add( new AjaxLink&lt;Object&gt;( "link" ) {
  
    private static final long serialVersionUID = 1L;
  
    @Override
    public void onClick( AjaxRequestTarget target ) {
      TestDialog dialog = getDialog( TestDialog.class, target );
      dialog.show( target );
    }
  } );
  
  g1182 clicked, Input is now 1
  g2183 clicked, Input is now 2
  g3184 clicked, Input is now 3
  </code></pre>
  
  <p>If I show the dialog in an AjaxSelfUpdatingTimerBehavior.onPostProcessTarget, the form component models are never updated!</p>
  
  <pre><code>  protected void onInitialize() {
      super.onInitialize();
  
      add( new AjaxSelfUpdatingTimerBehavior( Duration.ONE_SECOND ) {
  
        private static final long serialVersionUID = 1L;
  
        @Override
        protected void onPostProcessTarget( AjaxRequestTarget target ) {
  
          if( displayDialog() &amp;&amp; dialogNotDisplayedYet() ) {
            TestDialog dialog = getDialog( TestDialog.class, target );
            dialog.show( target );
          }
        }
      });
    }
  </code></pre>
  
  <p>getDialog creates ModalWindows and adds them to the component tree.  I've tried adding the dialogs at the point of need (as above) or creating the dialog during onInitialize and then just showing in onPostProcessTarget.  Makes no difference.</p>
  
  <pre><code>g1182 clicked, Input is now null
  g2183 clicked, Input is now null
  g3184 clicked, Input is now null
  </code></pre>
  
  <p>I am using wicket 6.19.0 and Java 7</p>
  
  <p>reason for implementation - I will be doing a long import task that may occasionally need to ask the user a question, so the behavior will scan for questions and present the dialog while the task waits for the answer. </p>
  
  <p>Please can anyone help me with this?</p>