Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1056

Template doesn't fit for Tree

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.0.1
    • Fix Version/s: None
    • Component/s: Databind 2
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ctapobep ctapobep
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: