Client Render on Demand"

From Documentation
Line 55: Line 55:
 
= Client ROD: Tabbox =
 
= Client ROD: Tabbox =
  
Client ROD is enabled for the invisible tabpanels. After the tabpanel becomes active, its content will be rendered and attached to the DOM tree.  
+
Client ROD is enabled for the invisible tabpanels. After the tabpanel becomes active, its content will be rendered and attached to the DOM tree.
 +
 
 +
= Client ROD: Organigram =
  
 
= Enable or Disable Client ROD =
 
= Enable or Disable Client ROD =

Revision as of 08:52, 8 November 2018


Client Render on Demand


  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion ee.png
[Since 5.0.0]

With Enterprise Edition, widgets[1] will delay the rendering of DOM elements until really required. For example, the DOM elements of comboitem won't be created until the drop down is shown up. It improved the performance a lot for a sophisticated user interface.

This feature is transparent to the application developers. All widgets are still instantiated (though DOM elements might not), so they can be accessed without knowing if this feature is turned on.



  1. A widget is the (JavaScript) object running at the client to represent a component

Client ROD: Tree

Client ROD is enabled only if a tree item is closed. Thus, to have the best performance (particularly for a huge tree), it is better to make all tree item closed initially.

<syntax lang="xml"> <treeitem forEach="${data}" open="false"> <treerow> <treecell label="${each.name}"/> <treecell label="${each.description}"/> </treerow>

   <treechildren>
       <treeitem forEach="${each.detail}" open="false">

<treerow> <treecell label="${each.name}"/> <treecell label="${each.description}"/> </treerow>

           <treechildren>
               <treeitem forEach="${each.fine}" open="false">

<treerow> <treecell label="${each.name}"/> <treecell label="${each.description}"/> </treerow> </treeitem> </treechildren> </treeitem> </treechildren> </treeitem> </syntax>

Client ROD: Groupbox

Client ROD is enabled only if a groupbox is closed. Thus, to have the best performance (particularly with sophisticated content), it is better to make the groupbox closed initially if proper.

Client ROD: Panel

Client ROD is enabled only if a panel is closed. Thus, to have the best performance (particularly for with sophisticated content), it is better to make the panel closed initially if proper.

Client ROD: Tabbox

Client ROD is enabled for the invisible tabpanels. After the tabpanel becomes active, its content will be rendered and attached to the DOM tree.

Client ROD: Organigram

Enable or Disable Client ROD

If you want to disable Client ROD for the whole application, you can specify a library property called org.zkoss.zul.client.rod rod with false. For example, specify the following in zk.xml:

<syntax lang="xml"> <library-property> <name>org.zkoss.zul.client.rod</name> <value>false</value> </library-property> </syntax>

Or, if you prefer to disable it for a particular page, then specify false to a page's attribute called org.zkoss.zul.client.rod rod, such as

<syntax lang="xml"> <custom-attributes org.zkoss.zul.client.rod="false" scope="page"/> </syntax>

Or, if you prefer to disable it for all descendants of a particular component, then specify false to a component's attribute. And, you can enable it for a subset of the descendants. For example,

<syntax lang="xml"> <window>

 <custom-attributes org.zkoss.zul.client.rod="false"/> 
   <custom-attributes org.zkoss.zul.client.rod="true"/> 

..

</window> </syntax>

Version History

Last Update : 2018/11/08


Version Date Content
     



Last Update : 2018/11/08

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