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

Tree node collapses after TreeDataEvent.CONTENTS_CHANGED event is fired

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.7, 5.0.7.1, 5.0.8, 5.0.9, 5.0.10, 5.0.11
    • Fix Version/s: 6.0.0
    • Component/s: None
    • Labels:
    • Environment:

      Tested with Firefox 10 and IE8 on Windows XP

      Description

      I have a tree with opened nodes, e.g.

      • Node A
      • Node B
      • Node C
      • Node D

      The tree data is given by a tree model which is a subclass of AbstractTreeModel.

      Now I want to change the label of a parent node, e.g. the label of node A shall be changed to "New label". Therefore I execute following statements:

      // ... change title of node A
      // myroot = parent of node A
      // pos = index position of node A
      treemodel.fireEvent(myroot, pos, pos, TreeDataEvent.CONTENTS_CHANGED);

      With ZK version 5.0.6 this works fine. However since version 5.0.7 and higher the node A collapses and it is no longer possible to open the node.

      I have attached a small demo. Open the page index.zul and expand all tree nodes. Then click on the button above the tree. This shall change the label of the root node. However with version 5.0.7 or higher this does not work.

        Attachments

          Activity

            People

            Assignee:
            jumperchen jumperchen
            Reporter:
            mpaula mpaula
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: