-
Bug
-
Resolution: Fixed
-
P4
-
jfx17
The tests were added in the fix for JDK-8124615 (early variant of also firing cancel in commit, was rt_29650), XX = List, Tree/Table, Tree.
They register handlers to count the events of every type and verify the expected number (1 for commit, 0 for cancel/start). They also try to test that the edited value actually is committed. This assert is commented for List, Tree/Table because it would fail due to the test bug. For Tree, it accidentally passes as a side-effect ofJDK-8187309, JDK-8187473 (missing default commit handler, cell illegally saving data).
The testbug is to add the counting commit handler via view.setOn which replaces the default (data saving) commit handler - thus nothing saved.
listView.setOnEditCommit(t -> {
rt_29650_commit_count++;
});
... //fire commit key on cell
// TODO should the following assert be enabled?
// assertEquals("Testing!", listView.getItems().get(0));
The fix is to follow instructions of java doc (editing sections of xxView) and register the counting handler via addEventHandler.
Note: for Tree, this will be fixed along with adding a default commit handler
They register handlers to count the events of every type and verify the expected number (1 for commit, 0 for cancel/start). They also try to test that the edited value actually is committed. This assert is commented for List, Tree/Table because it would fail due to the test bug. For Tree, it accidentally passes as a side-effect of
The testbug is to add the counting commit handler via view.setOn which replaces the default (data saving) commit handler - thus nothing saved.
listView.setOnEditCommit(t -> {
rt_29650_commit_count++;
});
... //fire commit key on cell
// TODO should the following assert be enabled?
// assertEquals("Testing!", listView.getItems().get(0));
The fix is to follow instructions of java doc (editing sections of xxView) and register the counting handler via addEventHandler.
Note: for Tree, this will be fixed along with adding a default commit handler
- relates to
-
JDK-8187309 TreeCell must not change tree's data
- Resolved
-
JDK-8124615 TreeView gets onEditCancel event when changes are commited
- Closed
-
JDK-8187473 TreeView: must have default editCommit handler
- Closed