On 02.11.2009, at 22:59, Igor Vaynberg wrote:

> if you want nonblocking you have to make each thing you are trying to
> load asynchronously its own page inside an iframe.
> 
> the page itself can only be accessed synchronously, otherwise you
> would have to do your own multithreaded access handling in
> components...which would be horrific.
> 
> -igor

I need to bring this topic up once more.

My current solution is to do the background processing in a separate thread and 
install a timer on the page to poll until the panel's content is ready. The 
resulting code is ok but feels heavy and unnatural. I would prefer a simpler 
solution. (I could not use iframes because they CSS does not have enough 
control over them.)

If I understand correctly, several pages can load asynchronously because only 
the state within a page is protected with synchronization. If so, can't one 
introduce a "stateless" component that lives in its own dummy page? I have the 
hope that if this is done nicely and the "dummy page" is abstracted away, it 
would feel much more natural to code asynchronous loading.

For example, such a LazyComponent would be constructed with the name of a 
wicket fragment. When rendered, it displays whatever markup has been add()'ed 
to the component ("loading"). When rendered, it makes an AJAX request to load 
the wicket fragment, which under the hood sits in a dummy page. I don't know 
enough about Wicket right now to code this so I want to ask whether this is 
possible and if yes, how this idea can be improved and whether somebody would 
be available with a few pointers to get me started.

Thanks,
Kaspar
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to