This content has been marked as final.
Show 1 reply
-
1. Re: Dynamic icons in rich tree
venkat.sadasivam Feb 26, 2008 11:38 PM (in response to toashishk)"toashishk" wrote:
1. Ability to define icon based on entity type by using one rich node tag. It should be able to evaluate the entity type on run time and then i will use entity type information to display icons for that entity(Using some component). As of now this can be achieved by using multiple tree nodes having different nodefaces which is bit restricting.
I don't understand what is restricting you."toashishk" wrote:
2. Ability to change icon for tree node based on tree node state.
These are different for iconExpanded and collapsed icons.
I have used below example code to achieve the functionality you mentioned above.<rich:tree switchType="client" value="#{leftNavigationBean.menuNode}" var="node" nodeFace="#{node.type}" componentState="#{leftNavigationBean.TreeState}" selectedClass="selectedTreeNode" id="Tree"> <rich:treeNode type="menu-group" iconLeaf="/images/closed.gif" icon="/images/open.gif"> <h:outputText value="#{node.value}" /> </rich:treeNode> <rich:treeNode type="menu-item" icon="/images/page.gif"> <h:commandLink value="#{node.value}" action="#{leftNavigationBean.go}"> <f:param value="#{node.id}" name="menuId" /> </h:commandLink> </rich:treeNode> </rich:tree>