Use Live Data and Paging"

From Documentation
Line 3: Line 3:
 
Sending out a listbox/grid/tree with a lot of items to the client is expensive. In addition, the JavaScript engines of some browsers are not good for initializing a listbox/grid/tree with a lot of items. A better solution is to use the live data, i.e., by assigning a model (such as <javadoc type="interface">org.zkoss.zul.ListModel</javadoc>) to it. Then, the items are sent to the client only if they become visible.
 
Sending out a listbox/grid/tree with a lot of items to the client is expensive. In addition, the JavaScript engines of some browsers are not good for initializing a listbox/grid/tree with a lot of items. A better solution is to use the live data, i.e., by assigning a model (such as <javadoc type="interface">org.zkoss.zul.ListModel</javadoc>) to it. Then, the items are sent to the client only if they become visible.
  
In additions, the performance will be improved more if you also use the paging mold such as
+
In addition, the performance will be improved more if you also use the paging mold such as
  
 
<source lang="xml">
 
<source lang="xml">

Revision as of 01:57, 27 July 2011

Sending out a listbox/grid/tree with a lot of items to the client is expensive. In addition, the JavaScript engines of some browsers are not good for initializing a listbox/grid/tree with a lot of items. A better solution is to use the live data, i.e., by assigning a model (such as ListModel) to it. Then, the items are sent to the client only if they become visible.

In addition, the performance will be improved more if you also use the paging mold such as

<listbox model="${mymodel}" mold="paging">
...

For more information of using and implementing a model, please refer to the Model section and ZK Component Reference: Listbox.

Version History

Version Date Content
     



Last Update : 2011/07/27

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.