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

binder reloads binded values due to wrong dependency detection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.5.1
    • Fix Version/s: 8.6.1
    • Component/s: Databind 2
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1, ZK 8.6.0 S1, ZK 8.6.0 S2, ZK 8.6.1 S1

      Description

      • 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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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