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



    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: 6.5.1
    • Fix Version/s: 6.5.2
    • Component/s: General
    • Environment:

      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. BBTreeController.java
          0.8 kB
        2. BBTreeModel.java
          5 kB
        3. BBTreeRenderer.java
          0.9 kB
        4. BBTreeTest.zul
          4 kB

          Issue Links



              jumperchen jumperchen
              bbrand bbrand
              2 Vote for this issue
              3 Start watching this issue