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

Creating a dynamic tree; treemode v6.5 has totally unexpected and unpredictable behavior while working as expected in v.5.0.11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • 6.5.2
    • 6.5.1
    • General
    • Linux, Chrome

      See attached code. This is a generic sample of a webpage deployed with a dynamic tree. The baseline is that the children of a node are dependent on the contents of the parent node. Due to large data sets this is done dynamically when the user expands a parent node in the getChild method. To facilitate this we need to detect a) that a parent node has been expanded and b) the contents of that parent node and c) the ability to build the list children before rendering the children.
      In v5.x the treemodel deployed works, it allows for this behavior. This will also function correctly in v6.5 if only one parent node is expanded and then closed before the following one is expanded. If a second node is expanded before the first node is closed (in v6.5) the treemodel transverses the complete tree as if all nodes are opened. All nodes then hit the "expand" logic in the getChild method (multiple times in fact) before the required results are shown. In a model with large date sets this unacceptable as all parent nodes are expanded and not on demand. See attached classes then when run show via debug output the differences when run under v5 and under v6.5.0

        1. BBTreeTest.zul
          4 kB
        2. BBTreeRenderer.java
          0.9 kB
        3. BBTreeModel.java
          5 kB
        4. BBTreeController.java
          0.8 kB

            jumperchen jumperchen
            bbrand bbrand
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: