[ 
https://issues.apache.org/jira/browse/WICKET-6448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127072#comment-16127072
 ] 

Martin Grigorov commented on WICKET-6448:
-----------------------------------------

Little by little we came to the proper solution: it should be a Behavior that 
can be reused by many components. Or even an IAjaxCallListener - for Ajax 
components.

https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-7.x/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaBehavior.java
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-7.x/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaAjaxCallListener.java

But as [~bitstorm] said: we cannot make everyone happy with a generic solution!
One will be happy with just adding "disabled" attribute. Another will need 
something more fancy as Ladda. Someone else will want to show a veil - on the 
button or even on the whole form in case there are more than one buttons.
This is my reason to not like this suggestion - it is too focused on 
IndicatingAjaxButton.
In one of my projects the client wanted the same. Initially we just added 
"disabled" attribute after click but then the problems started - the CSS 
framework had rules for disabled form elements and after clicking the mouse 
cursor became "cursor:not-allowed;" and the customer complained that it looks 
bad. So it is not so simple to add something "small" and force everyone to deal 
with it. 

We had conversation about this functionality in the mailing lists few years 
back.

> IndicatingAjaxButton should prevent double submit
> -------------------------------------------------
>
>                 Key: WICKET-6448
>                 URL: https://issues.apache.org/jira/browse/WICKET-6448
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 8.0.0-M6
>            Reporter: Kamil
>         Attachments: showcase-preventClick.zip
>
>
> 1)Run the app
> 2)Click "submit" quickly several times
> 3)Watch the console



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to