You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2007/12/01 11:41:49 UTC

Re: Asynchronous Ajax update of Panels, non-blocking

On Nov 30, 2007 11:56 AM, axess <ic...@astute.de> wrote:

> I have a page with Panels that need some more operation time to construct
> their model, because of heavy statistics calculation and database
> operations. The Panels should render their content when they are done
> after
> some seconds, but the user shouldn't get blocked with using the Page, i.e.
> clicking on links, etc.


See LazyLoadPanel (Lazy<ctrl-space>)


> The problem is, as I understood, Wicket only supports one request at a
> time.
> All clicks are just collected as "pending", as can be seen in the Wicket
> Ajax Debug window.


Yep.


> Is there only one Ajax channel? How could I use more? If this isn't
> possible, what could be a workaround for the Panels, so that they can
> respond immediately on the request, but update the content again when they
> have done their calculations?


The problem is that the page cannot be accessed by more than one thread:
this would create serious syncronization problems, and would hinder our
programming model.

If it really takes that long to establish your models, perhaps you should
create a queue and use a polling mechanism to update the panels that are
'ready'.

Martijn

-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/