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

Combobox fires a duplicate onChange event

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 9.6.4
    • 9.0.1.2, 9.5.1.3
    • None
    • Security Level: Jimmy
    • None

    Description

      Steps to Reproduce

      1. run attached code
      2. type 0, press Tab

      Current Result

      print "onChange" twice

      Expected Result

      print "onChange" once

      Debug Information

      • onSelect event sends another onChange event.
      • related code
        Combobox.service()
        			if (oldSel != null && !oldSel.equals(_selItem) && oldSel.getLabel().equals(val))
        				Events.postEvent(new InputEvent(Events.ON_CHANGE, this, val, val));
        

        oldSel.equals(_selItem) always true because _selitem is always null. It's caused by the item uuid in onSelect event sent from client doesn't exist at server e.g.

        cmd_1: onSelect
        uuid_1: z_3
        data_1: {"items":["z_4"],"reference":"z_4","prevSeld":"z_o"}
        

        z_4 doesn't exist at server.

      • 9.0.0.1 doesn't have this bug

      Attachments

        1. 4955.zul
          0.1 kB
          hawk
        2. ZK4955Composer.java
          4 kB
          hawk

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: