@Override public void removeNode(Object rowKey) { super.removeNode(rowKey); if (treeDataModel != null) { Object savedRowKey = treeDataModel.getRowKey(); try { treeDataModel.setRowKey(getRowKey()); treeDataModel.removeNode(rowKey); } finally { try { treeDataModel.setRowKey(savedRowKey); } catch (Exception e) { log.error(e.getMessage(), e); } } } }
@Override public void addNode(Object parentRowKey, TreeNode newNode, Object id) { super.addNode(parentRowKey, newNode, id); if (treeDataModel != null) { Object savedRowKey = treeDataModel.getRowKey(); try { treeDataModel.setRowKey(getRowKey()); treeDataModel.addNode(parentRowKey, newNode, id); } finally { try { treeDataModel.setRowKey(savedRowKey); } catch (Exception e) { log.error(e.getMessage(), e); } } } }
@Override public TreeNode getModelTreeNode() { TreeNode node = null; if (treeDataModel != null) { Object savedRowKey = treeDataModel.getRowKey(); try { treeDataModel.setRowKey(getRowKey()); node = treeDataModel.getModelTreeNode(); } finally { try { treeDataModel.setRowKey(savedRowKey); } catch (Exception e) { log.error(e.getMessage(), e); } } } return node; }