I\'m running Primefaces 3.2 and JSF 2.0 on Glassfish 3.
I\'ve tried a lot, to programatically set the selected node from a managed bean. That includes setting the se
I solved it using:
node.setSelected(true);
I discovered that selecting the node is not enough for the "tree component" to expand from root node to selected node.
For this, I used the following approach. On the view :
on the java code:
public void onExpand(NodeExpandEvent event) {
expand(event.getTreeNode());
}
private void expand(TreeNode treeNode){
if (treeNode.getParent()!=null){
treeNode.getParent().setExpanded(true);
expand(treeNode.getParent());
}
}