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

After setting new root on TreeView, focus model's focused item property is not updated

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      JavaFX 2.2b3 32-bit, Windows 7 64-bit

      Description

      When changing a TreeView by directly setting a new root and then calling focus(0), a binding present on "treeView.getFocusModel().focusedItemProperty()" will not be informed of the fact that the now focused item is a totally different object (although still at index 0). This causes other controls that display information about the currently focused item to not be updated.

      A work-around seems to be to set the focus to -1 first, then to 0 again to trigger the proper update.

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              jhendrikx John Hendrikx
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: