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

some ListProxy methods set _dirty directly instead of calling setDirty, missing updates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.0
    • 8.0.0, 9.5.1.2, 9.6.0
    • Databind 2
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      https://zkfiddle.org/sample/16c20mj/22-Another-new-ZK-fiddle

      Click add

      Current Result

      Binding doesn't find the new item in the listproxy, need to call BindUtils.postNotityChange to force update

      Expected Result

      adding item should trigger dirty workflow, cause binder update

      Debug Information

      https://github.com/zkoss/zk/blob/master/zkbind/src/org/zkoss/bind/proxy/ListProxy.java#L55

      ListProxy just sets _dirty to true directly.

      https://github.com/zkoss/zk/blob/498bf441d963978e0e5e2efd1406c890aeaa6433/zkbind/src/org/zkoss/bind/proxy/AbstractCollectionProxy.java#L86

      AbstractCollectionProxy calls setDirty(true) instead, which includes an update notification

      Workaround

      call BindUtils.postNotifyChange(bean, "collection") to force update

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

              Created:
              Updated:
              Resolved: