This content has been marked as final.
Show 3 replies
-
1. Re: Forum Comments Tree implementation using RichFaces
nbelaevski Nov 2, 2008 1:10 PM (in response to zeppelinux)Try this code:
<style type="text/css"> .rich-tree-node-highlighted { color: #{a4jSkin.generalTextColor}; text-decoration: none; } .rich-tree-node-selected { border-style: none; padding: 1px 4px; } </style> <h:form id="form"> <rich:tree id="tree" switchType="ajax" value="#{dataService.rootNode}" var="item" treeNodeVar="treeNode" nodeFace="#{treeNode.leaf ? 'leaf' : 'node'}" onselected="return false;" preserveModel="none"> <rich:treeNode id="node" type="node"> <h:outputText value="#{item} #{testBean.timeString}" /> </rich:treeNode> <rich:treeNode id="leaf" type="leaf"> <rich:panel header="Panel"> <h:outputText value="#{item} #{testBean.timeString}" /> </rich:panel> </rich:treeNode> </rich:tree> </h:form>
-
2. Re: Forum Comments Tree implementation using RichFaces
zeppelinux Nov 9, 2008 7:43 PM (in response to zeppelinux)It works, Thanks!
When some new leaf added to the node and the parent node had no children before it remains collapsed, so only icon is update (showing that it has collapsed children now).
Is there any way to force it to be expanded just after the first child added? -
3. Re: Forum Comments Tree implementation using RichFaces
ilya_shaikovsky Nov 10, 2008 5:51 AM (in response to zeppelinux)you could bind your tree and use queueNodeExpand(TreeRowKey rowKey) method.