On Thu, Feb 19, 2015 at 5:48 PM, ChambreNoire <[email protected]> wrote:

> Hi,
>
> The "search" AjaxLink is disabled. It's a service link and when it is
> clicked, it changes a content panel and sets a current view session
> variable. Its onConfigure method sets enabled based on whether the link
> refers to the current view. So effectively, click it once and it gets
> disabled until a different service link is clicked.
>
> So this happens because of this. But surely disabling links like this is
> pretty common? Why is this an issue now?
>

Because it takes time the Ajax call to go to the server and to return back,
and finally disable the link.
If you click faster several times on the link you will reproduce the issue.
You should disable the link before making the Ajax call with pure JS.

See http://wb-mgrigorov.rhcloud.com/extensions#ladda for example.

It uses this code:
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaAjaxLink.java#L87
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaAjaxCallListener.java#L14


> Many thanks,
>
> CN
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ListenerInvocationNotAllowedException-woes-tp4669616p4669652.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to