A long running process that you’d like to show some indicator of progress or similar, usually means an indicator of some kind. Here we use an IndicatingAjaxButton to show some progress near the clicked submit button, and we use an IAjaxCallDecorator to disable the submit button so we don’t get multiple clicks
form.add(new IndicatingAjaxButton("submit", form) { @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxPostprocessingCallDecorator(super.getAjaxCallDecorator()) { private static final long serialVersionUID = 1L; @Override public CharSequence postDecorateScript(CharSequence script) { return script + "this.disabled = true;"; } }; } } |

{ 1 comment… read it below or add one }
Hi,
Thanks lot for post, and this is working perfectly in IE not in Mozila, the button is not disabled in Mozila where as its disabling in IE. could you please reply me, this is urjent.
thanks in advance