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

TreeModel setAllSelected not updating the UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.0.0
    • 8.0.0, 8.6.2
    • Components
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      run the example, check the checkbox in the col1 header

      Current Result

      The selection is applied to the model but he UI only updates on newly rendered treeitems
      E.g.
      when checking first and then open child nodes (child nodes are checked)
      vs
      open children first, then check checkbox, nothing gets checked

      Expected Result

      selected nodes should update in the browser when changing the model

      Debug Info

      Root Cause

      https://github.com/zkoss/zk/blob/v8.6.3/zul/src/org/zkoss/zul/AbstractTreeModel.java#L924
      Client update is disabled during selectAll

      Workaround

      invalidate the tree component

        1. tree-select-all.zul
          0.3 kB
          cor3000
        2. TreeSelectAllComposer.java
          1.0 kB
          cor3000

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h