See org.apache.wicket.ajax.AjaxChannel.Type.DROP
You'll have to override AjaxLink#getChannel() to return DROP if you
want clicking on this AjaxLink to remove all scheduled ajax calls at
the client side.
But even with this improvement you'll still have to wait for the
currently being executed Ajax call (the first lazy loading component).

On Tue, Nov 1, 2011 at 1:03 PM, Michal Wegrzyn <[email protected]> wrote:
> Thanks for reply Martin.
>
> Using BookmarkablePageLink indeed cancels other lazy ajax requests,
> but then page is created from the scratch (as BookmarkablePageLink
> extends normal Link).
>
> At the moment only AjaxLinks are used (so they create just another ajax
> requests that are queued after ajax lazy requests) and one page, so
> I would like to do it without reloading whole page.
>
> Best regards,
> Michal Wegrzyn
>
> -----Original Message-----
> From: Martin Grigorov [mailto:[email protected]]
> Sent: Tuesday, November 01, 2011 11:05
> To: [email protected]
> Subject: Re: abort loading lazy components
>
> On Tue, Nov 1, 2011 at 10:36 AM, Michal Wegrzyn
> <[email protected]> wrote:
>> Hello,
>>
>> In application which I am developing AjaxLazyLoadPanel is used for several 
>> components.
>> Wicket creates queue of synchronous Ajax requests for every lazy component.
>>
>> I saw several discussions about the way how Wicket loads the components
>> (and AFAIK Wicket can do it only synchronously), but I could not find 
>> anything about
>> canceling these requests.
>>
>> Now, even if user triggers new request, he still has to wait to load all 
>> lazy components.
>> Then Wicket continues with request which was triggered during loading lazy 
>> components.
>
> Even when the new request is issued by BookmarkablePageLink ?
>
> I can see how requests to the same page instance are queued but
> request to new page should be possible.
>
>>
>> Is there any way to cancel loading of the lazy components and handle new 
>> request immediately?
>>
>> Yours sincerely,
>>
>> Michal Wegrzyn
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to