This content has been marked as final.
Show 5 replies
-
1. Re: rich:treeNode / How to disable treeNodes in a rich:tree
bm97 Sep 4, 2009 4:50 AM (in response to bm97)Could it be done with a customized renderer?
-
2. Re: rich:treeNode / How to disable treeNodes in a rich:tree
ilya_shaikovsky Sep 4, 2009 4:59 AM (in response to bm97)In general you could introduce some special type for example which will be added to nodes object which has no details during building tree structure. And add separate tree node to tree to define needed representation for them and turn off selection and submits from them.
-
3. SOLUTION: rich:treeNode / How to disable treeNodes in a rich
bm97 Sep 4, 2009 7:13 AM (in response to bm97)Thanks Ilya. It was easier than expected.
SOLUTION:
Use onselected="return false;" for the disabled node.<rich:tree id= "tree" switchType= "ajax" nodeSelectListener= "#{manager.onSelect}" ajaxSubmitSelection= "true" toggleOnClick= "false" immediate= "true" showConnectingLines= "false" disableKeyboardNavigation="true" preserveModel= "none" reRender= "fooBar" > <rich:recursiveTreeNodesAdaptor roots="#{manager.roots}" var="item" nodes="#{item.children}" > <rich:treeNode onselected="" rendered="#{item.enabled}"> <h:outputText value="#{item.id} - #{item.name}" /> </rich:treeNode> <rich:treeNode onselected="return false;" rendered="#{!item.enabled}"> <h:outputText value="#{item.id} - #{item.name}" style="text-decoration: line-through;"/> </rich:treeNode> </rich:recursiveTreeNodesAdaptor> </rich:tree>
-
4. rich:treeNode / How to disable treeNodes in a rich:tree
belgrade Mar 27, 2011 5:39 PM (in response to bm97)Well, at least there is a workaround, but would it not make sense to have 'disabled' attribute on the treeNode? I already have a few "type"s for tree nodes with pretty complex things within the node, and have to copy/paste each one of them.
-
5. rich:treeNode / How to disable treeNodes in a rich:tree
ilya_shaikovsky Mar 28, 2011 3:25 AM (in response to belgrade)We'll consider that while planning new features for sure.