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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
Use a veil to block the page while AJAX is executing? Ernesto On Fri, Sep 17, 2010 at 8:36 AM, MattyDE ufer.mar...@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-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
Re: Preventing double-clicking of Ajax-Buttons
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Preventing double-clicking of Ajax-Buttons
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Preventing double-clicking of Ajax-Buttons
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 ufer.mar...@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-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
Re: Preventing double-clicking of Ajax-Buttons
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org