You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tdelesio <td...@gmail.com> on 2009/09/23 17:55:05 UTC
Re: Disable Ajax Buttons/Links while a in request progress
I assume you meant to do this:
AjaxLink favLink = new AjaxLink("fav")
{
@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
public CharSequence decorateOnFailureScript(
CharSequence arg0)
{
return "this.disabled=false;";
}
public CharSequence decorateOnSuccessScript(
CharSequence arg0)
{
return "this.disabled=false;";
}
public CharSequence decorateScript(CharSequence script)
{
return "this.disabled=true;"+script;
}
};
}
};
But doing this does not work and still causes a double submit if I double
click on the link really fast. Anything I'm missing? Any other
suggestions?
Tim
igor.vaynberg wrote:
>
> ajaxcalldecorator {
> decoratescript(string script) { return "this.disabled=true;"+script; }
> decoratesuccess() { return "this.disabled=false;" }
> decoratefailure() { return "this.disabled=false;" }
> }
>
> -igor
>
>
> On 11/5/07, Francisco Diaz Trepat - gmail
> <fr...@gmail.com> wrote:
>> Hi, I wish to discuss best practices for disabling an AjaxLink and a
>> AjaxButton while a previous request is being process.
>>
>> f(t)
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Disable-Ajax-Buttons-Links-while-a-in-request-progress-tp13591964p25531206.html
Sent from the Wicket - User 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: Disable Ajax Buttons/Links while a in request progress
Posted by Igor Vaynberg <ig...@gmail.com>.
if the clientside is not good enough then use a serverside check
http://markmail.org/message/leji5o6dmubffm6q
-igor
On Wed, Sep 23, 2009 at 8:55 AM, tdelesio <td...@gmail.com> wrote:
>
> I assume you meant to do this:
>
> AjaxLink favLink = new AjaxLink("fav")
> {
>
>
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator()
> {
> return new IAjaxCallDecorator()
> {
>
> public CharSequence decorateOnFailureScript(
> CharSequence arg0)
> {
> return "this.disabled=false;";
> }
>
> public CharSequence decorateOnSuccessScript(
> CharSequence arg0)
> {
> return "this.disabled=false;";
> }
>
> public CharSequence decorateScript(CharSequence script)
> {
> return "this.disabled=true;"+script;
> }
>
> };
> }
> };
>
> But doing this does not work and still causes a double submit if I double
> click on the link really fast. Anything I'm missing? Any other
> suggestions?
>
> Tim
>
>
> igor.vaynberg wrote:
>>
>> ajaxcalldecorator {
>> decoratescript(string script) { return "this.disabled=true;"+script; }
>> decoratesuccess() { return "this.disabled=false;" }
>> decoratefailure() { return "this.disabled=false;" }
>> }
>>
>> -igor
>>
>>
>> On 11/5/07, Francisco Diaz Trepat - gmail
>> <fr...@gmail.com> wrote:
>>> Hi, I wish to discuss best practices for disabling an AjaxLink and a
>>> AjaxButton while a previous request is being process.
>>>
>>> f(t)
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Disable-Ajax-Buttons-Links-while-a-in-request-progress-tp13591964p25531206.html
> Sent from the Wicket - User 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