Column Tree <tc:columnNode/>

A tree can be added into a sheet. To do so, there are two steps which must be done. First, the value attribute of the sheet must refer to a method, which return a tree instead of a list. Second, to display the tree, use the <tc:columnNode/> tag.

Tag Library Documentation: <tc:sheet/> | <tc:columnNode/>

Column Tree

There is a tree in the first column. You can expand and collapse the items. The <tc:columnNode/> tag can contain several tags for a tree. In this example, it's a <tc:treeIndent/> to intent the single entries of the tree.

<tc:sheet value="#{sheetTreeController.solarTree}"
    var="solarObject" showRoot="true" showRootJunction="true">
  <tc:columnNode label="Name">
    <tc:treeIndent/>
    <tc:out value="#{solarObject.userObject.name}"/>
    ...
Name Central Body Distance Period Discoverer Year
Sun
- 0 0.0 -
Mercury
Sun 57910 87.97 -
Venus
Sun 108200 224.7 -
Earth
Sun 149600 365.26 -
Moon
Earth 384 27.32 -
Mars
Sun 227940 686.98 -
Phobos
Mars 9 0.32 Hall 1877
Deimos
Mars 23 1.26 Hall 1877
Jupiter
Sun 778330 4332.71 -
Metis
Jupiter 128 0.29 Synnott 1979
Adrastea
Jupiter 129 0.3 Jewitt 1979
Amalthea
Jupiter 181 0.5 Barnard 1892
Thebe
Jupiter 222 0.67 Synnott 1979
Io
Jupiter 422 1.77 Galileo 1610
Europa
Jupiter 671 3.55 Galileo 1610
Ganymede
Jupiter 1070 7.15 Galileo 1610
Callisto
Jupiter 1883 16.69 Galileo 1610
Themisto
Jupiter 7507 130.02 Sheppard 2000
Leda
Jupiter 11094 238.72 Kowal 1974
Himalia
Jupiter 11480 250.57 Perrine 1904
Lysithea
Jupiter 11720 259.22 Nicholson 1938
Elara
Jupiter 11737 259.65 Perrine 1905
Ananke
Jupiter 21200 -629.77 Nicholson 1951
Carme
Jupiter 22600 -702.3 Nicholson 1938
Pasiphae
Jupiter 23500 -708.0 Melotte 1908
Sinope
Jupiter 23700 -758.9 Nicholson 1914
Iocaste
Jupiter 20216 631.5 Sheppard 2000
Harpalyke
Jupiter 21132 623.3 Sheppard 2000
Praxidike
Jupiter 20964 625.3 Sheppard 2000
Taygete
Jupiter 23312 732.2 Sheppard 2000
Chaldene
Jupiter 23387 723.8 Sheppard 2000
Kalyke
Jupiter 23745 743.0 Sheppard 2000
Callirrhoe
Jupiter 24100 758.8 Sheppard 2000
Megaclite
Jupiter 23911 752.8 Sheppard 2000
Isonoe
Jupiter 23078 725.5 Sheppard 2000
Erinome
Jupiter 23168 728.3 Sheppard 2000
Saturn
Sun 1429400 10759.5 -
Pan
Saturn 134 0.58 Showalter 1990
Atlas
Saturn 138 0.6 Terrile 1980
Prometheus
Saturn 139 0.61 Collins 1980
Pandora
Saturn 142 0.63 Collins 1980
Epimetheus
Saturn 151 0.69 Walker 1980
Janus
Saturn 151 0.69 Dollfus 1966
Mimas
Saturn 186 0.94 Herschel 1789
Enceladus
Saturn 238 1.37 Herschel 1789
Tethys
Saturn 295 1.89 Cassini 1684
Telesto
Saturn 295 1.89 Smith 1980
Calypso
Saturn 295 1.89 Pascu 1980
Dione
Saturn 377 2.74 Cassini 1684
Helene
Saturn 377 2.74 Laques 1980
Rhea
Saturn 527 4.52 Cassini 1672
Titan
Saturn 1222 15.95 Huygens 1655
Hyperion
Saturn 1481 21.28 Bond 1848
Iapetus
Saturn 3561 79.33 Cassini 1671
Phoebe
Saturn 12952 -550.48 Pickering 1898
Uranus
Sun 2870990 30685.0 Herschel 1781
Cordelia
Uranus 50 0.34 Voyager 2 1986
Ophelia
Uranus 54 0.38 Voyager 2 1986
Bianca
Uranus 59 0.43 Voyager 2 1986
Cressida
Uranus 62 0.46 Voyager 2 1986
Desdemona
Uranus 63 0.47 Voyager 2 1986
Juliet
Uranus 64 0.49 Voyager 2 1986
Portia
Uranus 66 0.51 Voyager 2 1986
Rosalind
Uranus 70 0.56 Voyager 2 1986
Belinda
Uranus 75 0.62 Voyager 2 1986
1986U10
Uranus 76 0.64 Karkoschka 1999
Puck
Uranus 86 0.76 Voyager 2 1985
Miranda
Uranus 130 1.41 Kuiper 1948
Ariel
Uranus 191 2.52 Lassell 1851
Umbriel
Uranus 266 4.14 Lassell 1851
Titania
Uranus 436 8.71 Herschel 1787
Oberon
Uranus 583 13.46 Herschel 1787
Caliban
Uranus 7169 -579.39 Gladman 1997
Stephano
Uranus 7948 -677.48 Gladman 1999
Sycorax
Uranus 12213 -1283.48 Nicholson 1997
Prospero
Uranus 16568 -1962.95 Holman 1999
Setebos
Uranus 17681 -2196.35 Kavelaars 1999
Neptune
Sun 4504300 60190.0 Adams 1846
Naiad
Neptune 48 0.29 Voyager 2 1989
Thalassa
Neptune 50 0.31 Voyager 2 1989
Despina
Neptune 53 0.33 Voyager 2 1989
Galatea
Neptune 62 0.43 Voyager 2 1989
Larissa
Neptune 74 0.55 Reitsema 1989
Proteus
Neptune 118 1.12 Voyager 2 1989
Triton
Neptune 355 -5.88 Lassell 1846
Nereid
Neptune 5513 360.13 Kuiper 1949
Pluto
Sun 5913520 90800.0 Tombaugh 1930
Charon
Pluto 20 6.39 Christy 1978
<?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.sheet_tree} &lt;tc:columnNode/>"/> <p>A tree can be added into a sheet. To do so, there are two steps which must be done. First, the <code>value</code> attribute of the sheet must refer to a method, which return a tree instead of a list. Second, to display the tree, use the <code class="language-markup">&lt;tc:columnNode/></code> tag.</p> <p>Tag Library Documentation: <tc:link label="&lt;tc:sheet/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/sheet.html"/> | <tc:link label="&lt;tc:columnNode/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/columnNode.html"/></p> <tc:section label="Column Tree"> <p>There is a tree in the first column. You can expand and collapse the items. The <code class="language-markup">&lt;tc:columnNode/></code> tag can contain several tags for a tree. In this example, it's a <code class="language-markup">&lt;tc:treeIndent/></code> to intent the single entries of the tree.</p> <pre><code class="language-markup">&lt;tc:sheet value="\#{sheetTreeController.solarTree}" var="solarObject" showRoot="true" showRootJunction="true"> &lt;tc:columnNode label="Name"> &lt;tc:treeIndent/> &lt;tc:out value="\#{solarObject.userObject.name}"/> ...</code></pre> <tc:sheet id="sheet" value="#{sheetTreeController.solarTree}" var="solarObject" showRoot="true" showRootJunction="true"> <tc:columnNode id="nameCol" label="Name"> <tc:treeIndent/> <tc:out id="nameOut" value="#{solarObject.userObject.name}" labelLayout="skip"/> </tc:columnNode> <tc:column label="Central Body"> <tc:out id="centralBodyOut" value="#{solarObject.userObject.orbit}" labelLayout="skip"/> </tc:column> <tc:column label="Distance"> <tc:out id="distanceOut" value="#{solarObject.userObject.distance}" labelLayout="skip"/> </tc:column> <tc:column label="Period"> <tc:out id="periodOut" value="#{solarObject.userObject.period}" labelLayout="skip"/> </tc:column> <tc:column label="Discoverer"> <tc:out id="discovererOut" value="#{solarObject.userObject.discoverer}" labelLayout="skip"/> </tc:column> <tc:column label="Year"> <tc:out id="yearOut" value="#{solarObject.userObject.discoverYear}" labelLayout="skip"/> </tc:column> </tc:sheet> </tc:section> </ui:composition>