if (!componentState.isSelected(key)) {
if (tree.getAttributes().get(
UITree.SELECTED_NODE_PARAMETER_NAME) == null) {
new NodeSelectedEvent(tree, componentState.getSelectedNode()).queue();
new NodeSelectedEvent(node, componentState.getSelectedNode()).queue();
} else {
new AjaxSelectedEvent(tree, componentState.getSelectedNode()).queue();
new AjaxSelectedEvent(node, componentState.getSelectedNode()).queue();
}
}