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

Handling ambiguous ComboItem labels

    XMLWordPrintable

Details

    Description

      Steps to Reproduce

      run the attached example
      select the item AA/AhhAhh-02

      Actual Result

      the comboValue1 in the VM is set to AA/AhhAhh-01

      Expected Result

      the comboValue1 in the VM should be AA/AhhAhh-02 (the same object that was selected)

      Debug Info

      when saving the binding selectedItem="@bind(vm.comboValue1)" the
      ComboboxSelectedItemConverter executes during "onChange" - at that moment only the label "AA" is available in the event so the exact match cannot be retrieved

      Root Cause

      a combination of #2966241 (triggering the @save during onChange)
      and ZK-1492 (retrieving the synchronizing the selectedItem by it's label)

      Workaround

      1. only use unique Comboitem labels
      2. if ambiguous labels are necessary don't bind selectedItem =>it is save to retrieve the selected Model object from ListModel.getSelection()

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h