What I want:
- if I click on a button, it should be NOT enabled (not clickable) BEFORE the other methods (in the clicking) would finish, only AFTER the methods' end.
 
Here is my code to the button:
@Override
protected void onInitialize() {
    add(createOkLink());
}
private IndicatingAjaxLink<Void> createOkLink() {
    final IndicatingAjaxLink<Void> ret = new IndicatingAjaxLink<Void>("okLink") {
        private static final long serialVersionUID = 1L;
        @Override
        public void onClick(AjaxRequestTarget target) {
            //when I click on it, this button (link) should not be enabled while the rest of the methods are not finished.
            method1(); //about 2-5 seconds running time
            method2(); //about 2-5 seconds running time
            method3(); //about 2-5 seconds running time
            feedback.success("success");
            target.add(feedback);
            //after every method has finished, the button should be clickable againg
        }
    };
    ret.setOutputMarkupId(true);
    return ret;
}
I hope someone can help me!
I am using Wicket 6.