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

calling TreeView.getSelectionModel().select(null) shows strange behaviour

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u15
    • javafx
    • None


      One a TreeView with single item selection mode and one selected item, calling:

      treeView.getSelectionModel().select(null)

      causes:
      - The selection event to get fired as old value = something, new value = null -
      - the tree keeps highlighting the old selection
      - treeView.getSlectionModel().getSelectedItem() returns null

      I think either:
      - the selection model doesn't accept null as it is not part of the tree model,
      or
      - the tree clears the selection

      Is what one would expect

            jgiles Jonathan Giles
            atechnolojfx Anahata Technologies (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: