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

binder reloads binded values due to wrong dependency detection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.6.1
    • 8.5.1
    • Databind 2
    • Security Level: Jimmy
    • None
    • ZK 8.5.2 S1, ZK 8.6.0 S1, ZK 8.6.0 S2, ZK 8.6.1 S1

      • imagine a generic form as following:

      <window viewModel="@id('vm') @init('com.xy.RecordVM')" validationMessages="@id('vmsgs')"
      form="@id('fx') @load(vm.record) @save(vm.record, before='save')">
      <forEach items="@load(vm.fields" var="field">
      <textbox value="@bind(fx[field.id]) @validator(vm.validator, field=field)" />
      </forEach>
      </window>

      • user enters wrong value into 1st textbox -> validator shows error, OKAY
      • user enters correct value into 2nd textbox -> value of 1st textbox is reloaded from bean, wrong value is overwritten, NOT OKAY

      TrackerNode.getDependents(property) wrongly detects a dependency between binded values because of identical script snippet [field.id]. That's completely misleading because script evaluates very different depending on forEach loop variable.

            DevChu DevChu
            fse fse
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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