that or since this is more of a business logic, you might want to apply the
access logic before populating the treemodel.  That way is more of a
business logic and UI separation.

Bill
                                                                           
             "Andrew Robinson"                                             
             <andrew.rw.robins                                             
             [EMAIL PROTECTED]>                                              To 
                                       "MyFaces Discussion"                
             10/18/2006 10:52          <[email protected]>          
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Tree2- how to hide a branch     
                 "MyFaces                                                  
                Discussion"                                                
             <[EMAIL PROTECTED]                                             
                 ache.org>                                                 
                                                                           
                                                                           




You can do it via code in a custom tree node. Just don't return the
node you don't want to show in the getChildren() method and don't
count it in the getChildCount() method. AFAIK, there is no way to do
it in the XHTML/JSP.


On 10/18/06, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote:
> I need to hide a branch of a tree for certain users due to configuration.
I tried to use something like this
>
>         <f:facet name="Test Folder">
>             <h:panelGroup rendered="#{node.render}">
> ....
>             </h:panelGroup>
>         </f:facet>
>
> I could only hide a node this way, the little + sign still shows and can
be clicked to show the branch under this node.  What's a better way for
hide a branch?
>
> I'd like to leave my tree data alone since it is shared by all users.
This is just a display option.
>
> Thanks,
>
> Jane
>

Disclaimer: This electronic mail and any attachments are confidential and may 
be privileged. If you are not the intended recipient, please notify the sender 
immediately by replying to this email, and destroy all copies of this email and 
any attachments. Thank you.

Reply via email to