Hi,
I want to update a portion of my page based on the selection made on a rich:tree that is within the same page.But I am finding some problem with my code
I have a nodeselectionListener on my tree,which identifies which node has been selected according to its type,set a bean property which is the value of dynamic viewId
Node selection listener and viewId property
public void processSelection(NodeSelectedEvent event) { UITree tree = (UITree) event.getComponent(); String selectedNodeType=((CustomerTreeNode)tree.getTreeNode()).getType(); if(selectedNodeType.equals(CustomerTreeNode.SERVER_NODE)){ setSelection("server"); } if(selectedNodeType.equals(CustomerTreeNode.CUST_DETAILS_NODE)){ setSelection("details"); } } public String getCurrentDynamicView(){ System.out.println("inside current dynamic view"); if(getSelection().equals("server")){ System.out.println("Value is server"); return "/pages/includes/customer-server-edit.jspx"; } if(getSelection().equals("details")){ System.out.println("value is details"); return "/pages/includes/customer-info-edit.jspx"; } System.out.println("Something else"); return "/pages/includes/customer-info-edit.jspx"; }