One and only one MapPropertyBase<K,V> change listener works.

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8u121
    • Component/s: javafx
    • None
    • Environment:
    • x86
    • windows_10

      SimpleMapProperty<String, String> map = new SimpleMapProperty<>(FXCollections.observableHashMap());

      Add several change listeners and modify the map. Nothing happens.

      Example code attached.

      Expected output:

      Map Listener 1
      Map Listener 2
      Map Listener 3
      Boolean Listener 1
      Boolean Listener 2
      Boolean Listener 3

      Actual:

      Boolean Listener 1
      Boolean Listener 2
      Boolean Listener 3

      If any 2 of 3 map listeners are commented out, remaining single listener works. All 3 boolean property listeners work fine.

      Workaround is to bind another SimpleMapProperty and add listener there. This trick works as many times as required.

            Assignee:
            Kevin Rushforth
            Reporter:
            Petr Panteleyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: