Hi,
I want to render the treenodes of a treecomponent in my application dynamically based on some condition.For this I have given rendered=bean.someFn().The function is returning true or false.My treenode actually consists of one label and one checkbox.But when rendered is false also the treenode is shown with only the name of the node(without the checkbox).The code part for tree is as shown:
<rich:tree id="stree" switchType="client"
binding="#{appBean.stationTreeBinding}"
style="color:black;">
<rich:recursiveTreeNodesAdaptor
roots="#{tree.getTree()}" var="treeitem"
nodes="#{treeitem.getChildren()}">
<rich:treeNode nodeClass="depNodeStyle"
rendered="#{appBean.isNodeRendered(treeitem)}">
<h:selectBooleanCheckbox
value="#{tree.selectedPlantMap[treeitem]}"
rendered="#{appBean.isActivity(treeitem)}"
immediate="true" style="color:black;"
styleClass="depcheckbox">
<f:param name="selectedPlant" value="#{treeitem.path}" />
</h:selectBooleanCheckbox>
<h:outputLabel value="#{treeitem.name}" />
</rich:treeNode>
</rich:recursiveTreeNodesAdaptor>
</rich:tree>
What can be the reason for this.How can I avoid the rendering of the node completely.Pls help.
Thanks,
Deeps.
why not rebuild the tree