Reset the selected node in your "TreeStateAdvisor":
public Boolean adviseNodeSelected(UITree tree) -> return null.
Thanks for your reply. I already tried adviseNodeSelected attribute(for rich:tree) to point to a method returning null. I also tried using TreeStateAdvisor as you suggested. It did not help me either.
To explain it further, my tree is inside a modalpanel. On selecting a node, I need to populate a datatable. When modalpanel is closed and opened again, selected node state is maintaining. I want to reset the selection. Any help is appreciated.
IIRC, the return values mean:
true - it is selected
false - it is not selected
null - no change
Thus, if you select the node on the client, and the advisor returns null, it will still be selected. I believe false is what you want to return.
Tried with return value set to false. Now, I am able to reset the selection. But
the reset is happening immediately after the node is selected (avoiding me to
change the color of node selected). I want the selection
to reset when the modalpanel is closed.
You have to trigger a "reset-tree-action" on dialog close/open.
1. The "dialog-close-action" can change the tree-state-advisor.
2. Reset the tree-state before you open the dialog.
Maybe you have currently only a js-call "Richfaces.showModalPanel('...')" ?!