JXTreeTable: Data corruption issue on closing a branch while editing
Hi, seem to be getting NPE occationally, typically when a branch of a tree at the bottom of the table is being closed while editing (so that, after closing the branch, the initial row index at the editing node is more than the row count of the table after closing). Looks as if the tree is closed first and then the value is being set or something like that. Trace attached at the bottom.
Though I could live with this bug, I realized that, let's say my tree has root which has two children A, B and each has one children A1 and B1. Now, while I am editing A1 (row = 2), if I click on A, the value of A1 that I just entered is being set to B (after closing B is at row 2).
I tested this and am able to consistently reproduce it.
While we are at it, what if I don't want the user to close the branch till the edit is committed by the user in the cell? As in, if the partial edit is not valid, then I want to force the user to complete entering the right value before letting the user can close the branch.
at org.jdesktop.swing.JXTreeTable$TreeTableModelAdapter.nodeForRow(Unknown Source)
at org.jdesktop.swing.JXTreeTable$TreeTableModelAdapter.setValueAt(Unknown Source)
at org.jdesktop.swing.JXTable.setValueAt(Unknown Source)
at org.jdesktop.swing.JXTreeTable.editCellAt(Unknown Source)