You can override public CharSequence getAfterHandler(Component component) instead to disable the button *after* the Ajax call is made.
Martin Grigorov Wicket Training and Consulting Looking for a remote position with Wicket ? Contact me! https://twitter.com/mtgrigorov On Wed, Feb 21, 2018 at 8:34 PM, Claudia Hirt <hirt-clau...@gmx.de> wrote: > Thanks for your answer. Your tip for non-ajax-buttons helped me a lot. > Just another remark about that: disabling a Button in getTriggerJavaScript > leads to the side effect that the onsubmit method of the Button will not be > called because the disabling is done before form submit. > The css property pointer-events does the trick in most cases but is poorly > supported in Internet Explorer. > I‘ll keep on trying... > > Best regards, > Claudia Hirt > > > Am 20.02.2018 um 16:02 schrieb Andrea Del Bene <an.delb...@gmail.com>: > > > > Hi, > > > > as reported in its javadoc AjaxDisableComponentListener by default uses > the > > DOM attribute 'disabled' to do its job, but this attribute doesn't work > > with links. For this kind of components you have to provide the right > > JavaScript to enable/disable them by overriding > generateHandlerJavaScript. > > Id you are not using AJAX you can not use this behavior and you must > > provide the JavaScript code in some other way. For example with > SubmitLink > > you have to override getTriggerJavaScript. Unfortunately "disabling" a > html > > component is not a standard procedure so for those components that don't > > support the attribute 'disabled' we must use custom JavaScript. > > > >> On Mon, Feb 19, 2018 at 9:55 PM, Claudia Hirt <hirt-clau...@gmx.de> > wrote: > >> > >> By the way: is there any reason why AjaxDisableComponentListener has no > >> public constructor? > >> > >>> Am 19.02.2018 um 21:49 schrieb Claudia Hirt <hirt-clau...@gmx.de>: > >>> > >>> Hi all, > >>> I‘m facing the problem of double submits when double clicking on > buttons > >> and links. I was very pleased to see there’s a new listener of > >> https://issues.apache.org/jira/browse/WICKET-6448 implemented in wicket > >> 7.10. But this only works for Buttons not for links like a SubmitLink. > I‘m > >> also facing the same issue for non-ajax-components. > >>> Any suggestions how to solve this? > >>> Thanks in advance! > >>> Best regards, Claudia > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >