The <tc:treeMenu/> tag is deprecated, because it's easy to build a tree menu with the <tc:tree/> tag. You find an example as the navigation bar on the left side of this site.
<tc:treeMenu/>
<tc:tree/>
The menu nodes can be build inside of <tc:treeNode/> with <tc:treeCommand/>, <tc:treeLabel/>, <tc:treeIcon/> and <tc:treeIndent/> tags. It might be helpful to use cumstom classes here.
<tc:treeNode/>
<tc:treeCommand/>
<tc:treeLabel/>
<tc:treeIcon/>
<tc:treeIndent/>
In this example, a click on a node has no effect.
<tc:tree value="#{treeController.sample}" ...>
<?xml version="1.0" encoding="UTF-8"?> <!-- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --> <ui:composition template="/main.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:tc="http://myfaces.apache.org/tobago/component" xmlns:ui="http://java.sun.com/jsf/facelets"> <ui:param name="title" value="#{demoBundle.tree_menu} <tc:treeMenu>"/> <p>The <code class="language-markup"><tc:treeMenu/></code> tag is deprecated, because it's easy to build a tree menu with the <code class="language-markup"><tc:tree/></code> tag. You find an example as the navigation bar on the left side of this site. </p> <p> The menu nodes can be build inside of <code class="language-markup"><tc:treeNode/></code> with <code class="language-markup"><tc:treeCommand/></code>, <code class="language-markup"><tc:treeLabel/></code>, <code class="language-markup"><tc:treeIcon/></code> and <code class="language-markup"><tc:treeIndent/></code> tags. It might be helpful to use cumstom classes here. </p> <tc:section label="Example"> <p>In this example, a click on a node has no effect.</p> <pre><code class="language-markup"><tc:tree value="\#{treeController.sample}" ...></code></pre> <tc:tree value="#{treeController.sample}" var="node"> <tc:treeNode> <tc:treeCommand label="#{node.userObject.name}"/> <tc:treeIndent showJunctions="true"> <tc:style customClass="float-right"/> </tc:treeIndent> </tc:treeNode> </tc:tree> </tc:section> </ui:composition>