Tree Template"

From Documentation
(Created page with "{{ZKDevelopersReferencePageHeader}} Similar to Listbox, you can also define a customer rendering with a template ...")
 
m ((via JWB))
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
Similar to [[ZK Developer's Reference/MVC/View/Template/Listbox Template|Listbox]], you can also define a customer rendering with a template for a tree:
 
Similar to [[ZK Developer's Reference/MVC/View/Template/Listbox Template|Listbox]], you can also define a customer rendering with a template for a tree:
  
<source lang="xml" high="6,7,8,9,10,11,12,13">
+
<source lang="xml" highlight="6,7,8,9,10,11,12,13">
 
<tree model="${files}">
 
<tree model="${files}">
 
<treecols>
 
<treecols>
Line 23: Line 23:
  
 
=Version History=
 
=Version History=
{{LastUpdated}}
+
 
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-

Latest revision as of 07:34, 8 July 2022

Similar to Listbox, you can also define a customer rendering with a template for a tree:

<tree model="${files}">
	<treecols>
		<treecol label="Path"/>
		<treecol label="Description"/>
	</treecols>
	<template name="model">
		<treeitem context="menupopup">
			<treerow>
				<treecell label="${each.data.path}"/>
				<treecell label="${each.data.description}"/>
			</treerow>
		</treeitem>
	</template>
</tree>

assume files is an instance of DefaultTreeModel. Notice since DefaultTreeModel is used, each references an instance of DefaultTreeNode. Thus, to retrieve the real data, use DefaultTreeNode.getData()

Version History

Version Date Content
6.0.0 July 2011 The template feature was introduced.



Last Update : 2022/07/08

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