Organigram Template"
From Documentation
Charlesqiu (talk | contribs) |
m (remove empty version history (via JWB)) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{ZK EE}} | {{ZK EE}} | ||
− | + | {{versionSince |8.6.0}} | |
Similar to [[ZK Developer's Reference/MVC/View/Template/Listbox Template|Listbox]], you can also define a customer rendering with a template for an organigram: | Similar to [[ZK Developer's Reference/MVC/View/Template/Listbox Template|Listbox]], you can also define a customer rendering with a template for an organigram: | ||
Line 25: | Line 25: | ||
</source> | </source> | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Latest revision as of 04:39, 5 February 2024
- Available for ZK:
Since 8.6.0
Similar to Listbox, you can also define a customer rendering with a template for an organigram:
<zscript><![CDATA[
DefaultTreeNode root = new DefaultTreeNode(null, new DefaultTreeNode[]{
new DefaultTreeNode("Item1", new DefaultTreeNode[]{
new DefaultTreeNode("Item2"), new DefaultTreeNode("Item3"), new DefaultTreeNode("Item4")
})
});
DefaultTreeModel model = new DefaultTreeModel(root);
model.addOpenPath(new int[]{0});
]]></zscript>
<organigram model="${model}">
<template name="model">
<orgitem>
<orgnode label="${each.data}"/>
</orgitem>
</template>
</organigram>