You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by axess <ic...@astute.de> on 2007/11/30 11:56:59 UTC

Asynchronous Ajax update of Panels, non-blocking

Dear Wicket team,

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.

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. 

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?

Kind regards,
Bernd

-- 
View this message in context: http://www.nabble.com/Asynchronous-Ajax-update-of-Panels%2C-non-blocking-tf4902158.html#a14042453
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: Asynchronous Ajax update of Panels, non-blocking

Posted by Martijn Dashorst <ma...@gmail.com>.
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/