You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by MattyDE <uf...@gmail.com> on 2010/09/17 08:36:52 UTC
Preventing double-clicking of Ajax-Buttons
Hi,
any ideas how i could disable (client-side) an ajax-button after clicking
them once?
How should i process Form-Validation too? If the validation fails, the
button have to be enabled again to change some values, and re-submit the
form afterwards.
Any hints?
Thanks :)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preventing-double-clicking-of-Ajax-Buttons-tp2543415p2543415.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
SV: Preventing double-clicking of Ajax-Buttons
Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> any ideas how i could disable (client-side) an ajax-button after
> clicking
> them once?
Override getAjaxCallDecorator() and return an IAjaxCallDecorator which returns "getElementById('"+yourButton.getId()+"').disabled = true;"+script for decorateScript(). You also need to enable it in the success/failure methods.
- Tor Iver
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
Posted by MattyDE <uf...@gmail.com>.
Thanks a lot you both.
Works great as i see so far :)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preventing-double-clicking-of-Ajax-Buttons-tp2543415p2543462.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Martin,
Wicket will take care of the nasty details for you:-) Take a look at
[1] or search the list for different solutions.
Ernesto
References,
1-http://wicketinaction.com/tag/veil/
On Fri, Sep 17, 2010 at 8:46 AM, MattyDE <uf...@gmail.com> wrote:
>
> Mhmm okay.
>
> But how can i react on "form-validation" fails and hide the vail?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preventing-double-clicking-of-Ajax-Buttons-tp2543415p2543428.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
Posted by MattyDE <uf...@gmail.com>.
Mhmm okay.
But how can i react on "form-validation" fails and hide the vail?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preventing-double-clicking-of-Ajax-Buttons-tp2543415p2543428.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Use a veil to block the page while AJAX is executing?
Ernesto
On Fri, Sep 17, 2010 at 8:36 AM, MattyDE <uf...@gmail.com> wrote:
>
> Hi,
>
> any ideas how i could disable (client-side) an ajax-button after clicking
> them once?
>
> How should i process Form-Validation too? If the validation fails, the
> button have to be enabled again to change some values, and re-submit the
> form afterwards.
>
> Any hints?
>
> Thanks :)
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preventing-double-clicking-of-Ajax-Buttons-tp2543415p2543415.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org