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

TableView setTableMenuButtonVisible button doesn't work if column visibility is bound

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 7u15, 8
    • javafx
    • Windows 7 64-bit
      Java 7u14
      Java 8 b80

      What works:
      - It does shows the "+" button to get the menu.
      - It shows the menu of currently visible column when clicked.

      What doesn't work:

      - The menu shows when the button is right-clicked too.That brings up the context menu set on the table as well, so it shouldn't.
      - In JavaFX 2.2.7 selecting items in the menu has no effect at all.
      - In JavaFX 8.0.0-b80 selecting a column throws an exception:
      Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: A bound value cannot be set.
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:137)
              at com.sun.javafx.binding.BidirectionalBinding$BidirectionalBooleanBinding.changed(BidirectionalBinding.java:239)
              at com.sun.javafx.binding.BidirectionalBinding$BidirectionalBooleanBinding.changed(BidirectionalBinding.java:202)
              at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
              at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
              at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:101)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:108)
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:141)
              at javafx.scene.control.CheckMenuItem.setSelected(CheckMenuItem.java:131)
      ...

      - When first clicked, while the mouse is still hovering over the item, instead of showing a check it shows a tiny dot.
      - In both JavaFX 2.2 and 8.0 the menu is not dismissed when a selection is made.
      - In both JavaFX 2.2 and 8.0 there is no effect on the columns displayed, but re-showing the menu indicates checks on columns that aren't showing, or no checks on columns that are showing, depending on what selections have been made in the menu.

      Note that I have implemented an equivalent menu as the ContextMenu for the TableView and when I use that to show/hide columns it works perfectly, so the column definitions and table data appear to be okay.

            jgiles Jonathan Giles
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: