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

@load binding fire unreliably after ZK-3611 fix

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 8.5.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run fiddles
      Using EL with map and 'key' notation
      http://zkfiddle.org/sample/rsdu30/4-Zk-load-binding-maps
      Using EL with Bean and 'property' notation
      http://zkfiddle.org/sample/2mue0i2/1-ZK-load-binding-properties
      (results are identical between map + key and bean+property notations)

      Click the button to update all 3 beans values, but notify only the 2nd bean (at index 1 of 0..2)

      Click the button again after the first update

      Current Result

      In ZK 8.0.5 +

      On first click

      In listbox + template
      -bean['property'].property: all bindings are fired when only the 2nd one is expected.
      -bean.property.property: only the 2nd binding fired
      -bean.get('property').property: no bindings are fired

      In forEach
      -bean['property'].property: all bindings are fired when only the 2nd one is expected.
      -bean.property.property: all bindings are fired when only the 2nd one is expected.
      -bean.get('property').property: no bindings are fired

      In Children binding
      -bean['property'].property: all bindings are fired when only the 2nd one is expected.
      -bean.property.property: only the 2nd binding fired
      -bean.get('property').property: no bindings are fired

      Standalone labels
      -bean['property'].property: only the 2nd binding fired
      -bean.property.property: only the 2nd binding fired
      -bean.get('property').property: only the 2nd binding fired

      on 2nd click

      In listbox + template
      -bean['property'].property: no change
      -bean.property.property: no change
      -bean.get('property').property: all bindings are fired

      In forEach
      -bean['property'].property: no change
      -bean.property.property: no change
      -bean.get('property').property: all bindings are fired

      In Children binding
      -bean['property'].property: no change
      -bean.property.property: no change
      -bean.get('property').property: all bindings are fired

      Standalone labels
      -bean['property'].property: no change
      -bean.property.property: no change
      -bean.get('property').property: no change

      Expected Result

      Test the same files in ZK 8.0.4.2
      Only the bindings referring to the bean targeted by the notify call are updated.
      Subsequent notify calls don't have more effects.

      Debug Info

      https://github.com/zkoss/zk/commit/636f0e508c3cd7b8208f28d0e6c896cb5f20941d

      Root Cause

      Workaround

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

              Created:
              Updated:
              Resolved: