Tree Model"
From Documentation
m |
m |
||
Line 2: | Line 2: | ||
Here we describe how to implement a tree model (<javadoc type="interface">org.zkoss.zul.TreeModel</javadoc>). For the concept about component, model and render, please refer to [[ZK_Developer's_Reference/MVC/Model/List_Model#Model-driven_Display|the Model-driven Display section]]. | Here we describe how to implement a tree model (<javadoc type="interface">org.zkoss.zul.TreeModel</javadoc>). For the concept about component, model and render, please refer to [[ZK_Developer's_Reference/MVC/Model/List_Model#Model-driven_Display|the Model-driven Display section]]. | ||
+ | |||
+ | Instead of implementing <javadoc type="interface">org.zkoss.zul.TreeModel</javadoc> from scratch, it is suggested to extend from <javadoc>org.zkoss.zul.AbstractTreeModel</javadoc>, which will handle the data listeners transparently. | ||
+ | |||
+ | In additions, if the tree is small enough to be loaded completely, you could use the default implementation, <javadoc>org.zkoss.zul.SimpleTreeModel</javadoc>, which uses <javadoc>org.zkoss.zul.SimpleTreeNode</javadoc> to construct a tree. | ||
=Version History= | =Version History= |
Revision as of 03:59, 30 December 2010
Here we describe how to implement a tree model (TreeModel). For the concept about component, model and render, please refer to the Model-driven Display section.
Instead of implementing TreeModel from scratch, it is suggested to extend from AbstractTreeModel, which will handle the data listeners transparently.
In additions, if the tree is small enough to be loaded completely, you could use the default implementation, SimpleTreeModel, which uses SimpleTreeNode to construct a tree.
Version History
Version | Date | Content |
---|---|---|