JDK-8123037 : javafx.scene.control.TableView: column headers shoud appear
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-06-07
  • Updated: 2015-06-17
  • Resolved: 2013-06-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
Description
run application attached
- double-click on last row of tableView, press ESC to cancel editing.

result: column headers appear
expected:  column headers should be shown before some actions with editable cells

Comments
Close as verified on 8.0b97
07-07-2013

Target build: b95
03-07-2013

RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/columnsOrderTest Exception org.jemmy.TimeoutExpiredException: State '[Correct number of column headers]' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/comparatorPropertyImmidiateAndCorrectApplyingTest Exception java.lang.NullPointerException RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/comparatorPropertyImmidiateAndCorrectApplyingTest Exception org.jemmy.JemmyException: Failed to execute action 'org.jemmy.fx.RelativeMouse$1...' through Platform.runLater RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/correctSortConsistencyTest Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/testAllDataRemoving Exception org.jemmy.TimeoutExpiredException: State 'Control having expected image' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewTest/columnAutoSize Exception org.jemmy.TimeoutExpiredException: State 'javafx.scene.control.test.tableview.TableViewTest$3...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/columnSortablePropertyTest Exception java.lang.AssertionError: Sort order is wrong RULE ControlsAutomatedTestSuite/javafx/scene/control/test/tableview/TableViewNewTest/testSortOrderAPI Exception java.lang.AssertionError: Sort order is wrong RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/columnSortablePropertyTest Exception java.lang.AssertionError: Sort order is wrong RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/comparatorPropertyImmidiateAndCorrectApplyingTest Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/comparatorPropertyTest Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/correctSortConsistencyTest Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/sortNodeImmidiateApplying Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsOldTreeTest/initialStateTest Exception org.jemmy.TimeoutExpiredException: State 'Control having expected image' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsTableTest/columnAutoSize Exception org.jemmy.TimeoutExpiredException: State 'javafx.scene.control.test.tableview.TableViewTest$3...' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/testAllDataRemoving Exception org.jemmy.TimeoutExpiredException: State 'Control having expected image' has not been reached in ... milliseconds RULE ControlsAutomatedTestSuite/javafx/scene/control/test/treetable/TreeTableAsNewTableTest/graphicPropertyTest Exception org.jemmy.TimeoutExpiredException: State 'Waiting for ... com.sun.javafx.scene.control.skin.TableColumnHeader controls to be found adhering to javafx.scene.control.test.tableview.ApplicationInteractionFunctions$2...' has not been reached in ... milliseconds
18-06-2013

Target build: b94
17-06-2013

Aside of the changes the diff above, I had to move setNeedsLayout(false) to the end of layout() method. The problem was that TableView requestLayout() was often call from it's childs as getParent().requestLayout() during the layout. The attempt to schedule next layout pass was stopped, but as needsLayout property was already false, it was set back to true, making all subsequent (valid) calls of requestLayout to skip the call. Although it's not the case of double-layout problem (the requestLayout calls were not necessary), such calls should be correctly handled.
13-06-2013

Affected tests: ControlsAutomatedTestSuite/javafx/scene/control/test/mixedpanes/ControlsLayoutPart2Test/TilePaneTest
13-06-2013

This fix only partially resolves the issue. Column reordering, resizing and sorting are also broken. Are you planning to investigate these issues as well?
11-06-2013

Attaching my fix for this issue, for controls team to review. But I'm not sure if this will work correctly on column change. It may require some additional listeners...
10-06-2013

The problem is that TableView, specifically NestedTableColumnHeader manipulates with it's columnHeaders list in the layoutChildren() method, which leads to a change of it's min/pref size. This means it would require second layout pass to do the correct layout, as it reports 0 on the first layout pass, due to empty columnHeaders list (columnHeaders are used to compute min/pref size of NestedTableColumnHeader). A need for multiple layout pass is a bug as it should be possible to compute the sizes on the first pass. We plan to eliminate multiple layout passes in the near future, as it may cause problems in multiple areas (SceneBuilder, printing, etc...), so this needs to be fixed anyway.
10-06-2013

@Martin: The controls repo has imported your fixes for RT-30363 from the graphics repo, but perhaps not all of them...
10-06-2013

I can reproduce it on the provided application, but not on HelloTableView or other application with a TableView.
10-06-2013

This bug is due to RT-30363, and can be recreated in far simpler test applications (e.g HelloTableView shows the same symptoms).
09-06-2013