Rendered attribute on treenode not working correctly
----------------------------------------------------

                 Key: RF-9078
                 URL: https://jira.jboss.org/browse/RF-9078
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-tree
    Affects Versions: 3.3.3.Final
         Environment: Jboss application server on Linux and Firefox 3.6.8
            Reporter: Thomas Andergassen


I implemented a tree with treenodeadaptors and am trying to only show nodes, 
the user has permission to. 

                                <rich:tree style="margin-top:20px" 
stateAdvisor="#{techTreeStateAdvisor}" preserveModel="ajax">
                                        <rich:treeNodesAdaptor id="cps" 
nodes="#{cpList.resultList}" var="cps">
                                                <rich:treeNode>
                                                        <h:outputText 
value="#{cps.name}" />
                                                </rich:treeNode>
                                                <rich:treeNodesAdaptor id="drd" 
nodes="#{cps.drd}" var="drds">
                                                        <rich:treeNode>
                                                                <h:outputText 
value="#{drds.name}" />
                                                        </rich:treeNode>
                                                        <rich:treeNodesAdaptor 
id="sns" nodes="#{drds.sns}"
                                                                var="sns">
                                                                <rich:treeNode 
rendered="#{s:hasPermission(sns,'read')}" >
                                                                        
<h:commandLink action="#{snsView.view(sns)}" value="#{sns.name}" 
rendered="#{s:hasPermission(sns,'read')}">
                                                                        
</h:commandLink>
                                                                </rich:treeNode>
                                                        </rich:treeNodesAdaptor>
                                                </rich:treeNodesAdaptor>
                                        </rich:treeNodesAdaptor>
                                </rich:tree>

The problem is, when the user has no right to see, the node is rendered anyway 
as text, but not as link. If I remove the rendered attribute from the treeNode, 
it shows me a node image, but no link or text, as the commandlink isn't 
rendered. Even setting rendered to false directly doesn't help.

I couln't find anything that tells me if this behavior is normal

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to