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

Combobox binding problem - Empty Combo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 8.0.0
    • Components
    • Security Level: Jimmy
    • ZK 8.0.1 S2
    • None

      Sometimes when user clears one selected value on combobox, the binding doesn't update the value in viewmodel.
      In atachmment I send one video taken from your combobox demo page demonstrating this problem:
      http://www.zkoss.org/zkdemo/combobox/simple_combobox

      Additional information (MDuchemin):
      When selecting a item from the combobox, the combobox value is updated, but not the _defRawVal.
      In InputWidget:updateChange_, the current value is compared to _defRawValue, and the onChange event is not sent if they are equal

                              if (!this._reVald && n == this._defRawVal) {
                                  return false
                              }
      

      Steps to reproduce in a combobox:
      1-Enter a value (empty string or any string), and trigger an updateChange_ (by clicking outside of the combobox), _defRawVal will be updated with the current value and onchange event is sent to the server.
      2-Select a combobox item. Combobox text / value is updated, onSelect event is sent to the server, but _defRawVal is not updated.
      3-Enter the same value used in step 1. Because value is equal to _defRawVal, onChange event is not sent when clicking out of the combobox.

      reproduced with : 8.0.1.FL.20151105-Eval

            wenninghsu wenninghsu
            eclipse2 eclipse2
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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