- 
        1. Re: clear selected node in rich:tree tagahoehma Nov 5, 2009 9:41 AM (in response to snowhite)Untested: 
 Reset the selected node in your "TreeStateAdvisor":
 public Boolean adviseNodeSelected(UITree tree) -> return null.
 regards
 Andreas
- 
        2. Re: clear selected node in rich:tree tagsnowhite Nov 5, 2009 2:20 PM (in response to snowhite)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.
 Thanks
- 
        3. Re: clear selected node in rich:tree tagshadowcreeper Nov 5, 2009 4:17 PM (in response to snowhite)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.
- 
        4. Re: clear selected node in rich:tree tagsnowhite Nov 5, 2009 6:19 PM (in response to snowhite)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.
- 
        5. Re: clear selected node in rich:tree tagahoehma Nov 6, 2009 4:12 AM (in response to snowhite)You have to trigger a "reset-tree-action" on dialog close/open. 
 1. The "dialog-close-action" can change the tree-state-advisor.
 or
 2. Reset the tree-state before you open the dialog.
 Maybe you have currently only a js-call "Richfaces.showModalPanel('...')" ?!
 Try this:
 <a4j:commandButton
 id="openDialogCommand"
 value="#{bundle['components.softwareVariant.add']}"
 action="#{dialogTreeManager.resetSelection}"
 oncomplete="Richfaces.showModalPanel('dlgId');return false;"
 reRender="#{rich:clientId('dlgId')}"/>
 
     
    