Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117412

SimpleObjectProperty does not notify listeners when its value is set to a different object with the same value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • javafx
    • None
    • JavafX 2.0 GA

      SimpleObjectProperty can hold a property that is mutable and complex. If the property is set to a different object that ".equals()" the previous object the listeners are not notified. One area where this is a problem is in the case of SimpleObjectProperty<ObservableList<?>>. It is essential to receive notifications for changes to the property so that client code can remove listeners from the old list and add them to the new list. If clients added listeners to the initial list while it was still empty and the list is changed to a new empty list, clients are not notified that the list object has changed and there is no way for them to know that they should remove listeners from the old list and add them to the new one. TableView.itemsProperty() has the same issue.

      Problem reproduced in the attached file

            mheinrichs Michael Heinrichs (Inactive)
            aswanepoejfx Abraham Swanepoel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: