You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bharath Belagodu <BB...@trivininc.com> on 2006/11/21 20:39:43 UTC

tree2 commandLink

In using Myfaces 1.1.4, tomahawk 1.1.3, I'm trying to get the tree2
working for navigation. The menu system is created during the startup of
the application with the appropriate URLs. Since this menu system has to
be a reusable component, I can't use navigation rules to specify actions
for the tree2.

 

I started off with the sample tree2 and I'm modifying it to fit my
requirement. Here's the code to tree2 with the facet for the leaf node
(a commandLInk),

 

<f:facet name="document">

      <h:panelGroup>

            <h:commandLink immediate="true" rendered="#{node.enabled}"

                        styleClass="#{t.nodeSelected ?
'documentSelected':'document'}"

                        actionListener="#{treeHandler.selectNode}"

                        action="#{node.getIdentifier}">

                        <t:graphicImage value="images/document.png"
border="0" />

                  <h:outputText value="#{node.description}" />

            </h:commandLink>

      </h:panelGroup>

</f:facet>

 

 

The TreeNode is constructed with the URL and the URL for the tree leaf
node is stored as 'identifier' in TreeNodeBase object. How do I use this
URL to navigate the menu structure and also reuse this tree in other
webpages for that session?

 

Thanks.