-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
8
I have a TreeTable, with some cells have a context menu for adding children treeItems.
The second column of my TreeTable is a String column, with a cell factory that returns a TextFieldTreeTableCell.
I right-click on some item, and choose "Add value", a new child TreeItem is created dynamically. I double-click on the second column of the newly created treeItem in order to start editing.
I add a breakpoint in the code of TextFieldTreeTableCell.startEdit() method, and I watch for the value of cell.getItem().
I notice that cell.getItem() contains the wrong value . In fact, it contains the value of the cell of another TreeItem that is below it in the tree.
It seems like when adding items dynamically (after the TreeTable has been created), the cells are not properly "shifting" their items' values.
I am not sure if I explain well, I will add the scenario's code in a separate comment. If you follow the above sample, and add a breakpoint in startEdit(), you will see the problem.
The second column of my TreeTable is a String column, with a cell factory that returns a TextFieldTreeTableCell.
I right-click on some item, and choose "Add value", a new child TreeItem is created dynamically. I double-click on the second column of the newly created treeItem in order to start editing.
I add a breakpoint in the code of TextFieldTreeTableCell.startEdit() method, and I watch for the value of cell.getItem().
I notice that cell.getItem() contains the wrong value . In fact, it contains the value of the cell of another TreeItem that is below it in the tree.
It seems like when adding items dynamically (after the TreeTable has been created), the cells are not properly "shifting" their items' values.
I am not sure if I explain well, I will add the scenario's code in a separate comment. If you follow the above sample, and add a breakpoint in startEdit(), you will see the problem.
- relates to
-
JDK-8124619 Ensemble3: XYChart Visualization in TreeTableView doesn't update on underlying data update
-
- Resolved
-