-
New Feature
-
Resolution: Unresolved
-
Normal
-
None
-
6.0.1
-
None
The introduced template is sufficient when we're talking about lists or combo boxes. But the problem appears when we work with the tree, ideally I'd like to work like this:
<treechildren> <template value="@bind(vm.someList)" var="listItem"> <treeitem label="@bind(listItem.firstLevelTitle)"> <treechildren> <template value="@bind(listItem.childList)" var="childItem"> <listitem label="@bind(childItem.secondLevelLabel"/> </template> </treechildren> </treeitem> </treechildren>
This essentially allows several important things to do:
- Controlling the tree in ZUL instead of creating a TreeModel in Java
- It can be used in any structure - templating here means the iteration only, it doesn't dictate what model of what component should be used. So essentially a ListModel can be used for the tree as well.
- I could control how sub-nodes and leaves look like on ZUL page, what context menu they have, what picture and what buttons can be placed there.
But I can't do anything like that at the moment, I can build and control things only in Java which is very tedious.
This task though touches both - working with the tree and the problem of template in general.