-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all, in wicket there is a component AjaxLazyLoadPanel that can be used if we have a panel/component that is pretty heavy in creation
and we first want to show the user the page and then replace the panel when it is ready.
How can I do in ZK.
Gesuino
Thank you Simon I'm using zk 5.0.0 so at this moment i cannot try your code indication, but i'm going to switch to 5.0.2 zk version to test on my application the deferred rendering.
This is an important features for my heavy uis thank you.
Best wishes,
Gesuino.
Ok i switch to zk 5.0.2 version and i inserted the renderdefer to a listbox element and this works fine.
<listbox renderdefer="1000" id="documents" visible="true"> .................. </listbox>
The ui is displayed early and the lisbox is loaded after one second.
There is a problem with this solution the UI is deferred but the data content in the listbox are loaded and i must wait this loading. This is different from the wicket AjaxLazyLoadPanel behaviour in this wicket component the UI doesn't wait the data loading but first appears the UI and when the data are ready show the data.
This effect is much appreciated from the user that see a fast response from the application although the data are deferred showed.
.
So, what is it you're wanting? Do you want the whole page except the panel to appear and then the contents of the panel get retrieved and displayed?
Check the fullfill attribute, see http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/Performance_Tips/Defer_the_Creation_of_Child_Components
Hi Cary I want to show immediatly the ui to the user without having to wait for DB data loading when the data are ready for a zk component this are filled with the data and showed in lazy mode to the User. See this wicket features for more info wicket lazy loading component
Hi xmedeko the fullfill attribute it's ok but requires an user event to performs an action (on.click,on.select,on.Open) but I want this behaviour but without an user interaction.
Hi, gesuinonapoli,
I do not know the Wicket, but all actions in the ZK desktop (aka browser tab) are performed synchronized. I.e. you cannot easily load data in the background. Every time you load some data the user has to wait and the UI is frozen. (This feature simplifies the development in most cases). If you need to load some data in background, then I you have to start a new thread programmatically and check the result by the ZK timer. When the data are ready, show the content of the listbox and stop the timer. See http://www.zkoss.org/zkdemo/server_push
ZK can also has also a Server Push - Comet, but I think it's overkill for your scenario.
Asked: 2011-01-26 10:49:19 +0800
Seen: 1,651 times
Last updated: Mar 04 '11