0

ZK Lazy Loading Component

asked 2011-01-26 10:49:19 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

updated 2011-01-26 10:49:58 +0800

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

delete flag offensive retag edit

14 Replies

Sort by ยป oldest newest

answered 2011-01-26 18:56:00 +0800

SimonPai gravatar image SimonPai
1696 1

Hi Gesuino,

You can refer to this part of the guide: defer the rendering.

Regards,
Simon

link publish delete flag offensive edit

answered 2011-01-28 08:01:57 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

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.

link publish delete flag offensive edit

answered 2011-01-28 08:37:28 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

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.

link publish delete flag offensive edit

answered 2011-01-28 10:26:57 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

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.

link publish delete flag offensive edit

answered 2011-02-01 15:45:51 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

.

link publish delete flag offensive edit

answered 2011-02-01 16:17:56 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

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?

link publish delete flag offensive edit
link publish delete flag offensive edit

answered 2011-02-02 16:48:09 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

updated 2011-02-02 16:51:00 +0800

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

link publish delete flag offensive edit

answered 2011-02-02 16:55:16 +0800

gesuinonapoli gravatar image gesuinonapoli
51 1
http://gesuinonapoli.blog...

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.

link publish delete flag offensive edit

answered 2011-02-03 01:15:10 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

updated 2011-02-03 01:16:13 +0800

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-01-26 10:49:19 +0800

Seen: 1,651 times

Last updated: Mar 04 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More