The next bug with the tree component in the current release is an empty selection if we click twice on the same tree node. The first click is ok. For second click we have empty params.get(selectionParam). See decode() method in the TreeRenderer
Code: Select all
if(params.containsKey(selectionParam)) {
String selectedNodesValue = params.get(selectionParam);
if(selectedNodesValue.equals(""))
tree.setSelection(new TreeNode[0]);
else {
String[] selectedRowKeys = selectedNodesValue.split(",");
TreeNode[] selectedNodes = new TreeNode[selectedRowKeys.length];
TreeModel model = new TreeModel((TreeNode) tree.getValue());
for(int i = 0 ; i < selectedRowKeys.length; i++) {
selectedNodes[i] = treeExplorer.findTreeNode(selectedRowKeys[i], model);
model.setRowIndex(-1); //reset
}
tree.setSelection(selectedNodes);
}
}