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

Tree with client-ROD fails to replace treerow if parent is currently not rendered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 10.0.0, 9.6.4
    • 9.6.3
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run fiddle:

      https://zkfiddle.org/sample/194i5tp/2-Another-new-ZK-fiddle

      Scroll down until you located the item with the label "Item-44" (about 2 scrolls from the bottom)

      Click on the item.

      This trigger a TreeModel onDataUpdate event, causing the treeRow to update.

      Treerow update is sent with the response (rm orignal row, addBfr with the new row data)

      Current Result

      Row is not updated

      Old row is still in place, but has no behaviors

      Expected Result

      Old row is removed, new row is added

      Debug Information

      caused by:

      the parent of item-44 is "item-4"

      when item-44 is in view, item-4 is out of the ROD viewport, and is currently not rendered.

      this causes treeitem.parent.parent.desktop to be null at this stage

      Since the parent treeitem desktop is null, the treeitem is not removed, and the new item is not inserted properly, causing unsync with the server state

      Workaround

      disable client-rod for tree

       

      <custom-attributes org.zkoss.zul.client.rod="false"/>
      

            gordonhsu gordonhsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: