Have you tried this:
http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html

2008/11/25 noppy-flex <[EMAIL PROTECTED]>:
>
> Hi,
>
> I'm trying to make an indicator visible when an ajax request is processed.
> For a checkbox this is working well:
>
>  final AjaxCheckBox ac = new AjaxCheckBox("an", new Model()) {
>     private static final long serialVersionUID = 0L;
>
>     @Override
>     protected void onUpdate(AjaxRequestTarget target) {
>        target.addComponent(Panel.this);
>     }
>  };
>
>  add(ac);
>  ac.add(new TestAjaxBehavior());
>
>  class TestAjaxBehavior extends AjaxFormComponentUpdatingBehavior
> implements
>      IAjaxIndicatorAware {
>    private static final long serialVersionUID = -2704582236045420318L;
>
>    public TestAjaxBehavior() {
>      super("onchange");
>    }
>
>    protected void onUpdate(AjaxRequestTarget target) {
>      try {
>        Thread.sleep(5000);
>      } catch (InterruptedException e) {
>        e.printStackTrace();
>      }
>    }
>
>    public String getAjaxIndicatorMarkupId() {
>      return imgContainer.getMarkupId();
>    }
>  }
>
> Markup-File:
>  ...
>
>  <input type="checkBox" wicket:id="an"/>
>  ...
>
> The same code fails when the checkbox is replaced by an ajax-button:
>
>  final AjaxButton ac = new AjaxButton("an") {
>      private static final long serialVersionUID = 0L;
>
>      protected void onSubmit(AjaxRequestTarget target, Form form) {
>        target.addComponent(Panel.this);
>      }
>    };
>
>    add(ac);
>    ac.add(new TestAjaxBehavior());
>
> Markup-File:
>
>
>    <input type="submit" wicket:id="an"/>
>
> I'm using wicket 1.34 but tried it also with 1.35.
>
> Tanks for any help
> --
> View this message in context: 
> http://www.nabble.com/ajax-indicator-tp20683826p20683826.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to