Section <tc:section>

A section can be added with <tc:section/> tag.

Tag Library Documentation

Basics

A section can have a title. It is added with the label attribute. This text is the content of a section.

<tc:section label="Basics">

Cascading

A section can contain one or more sections. In this example, the sections are cascaded to level six.

Section 2

Level two. The section "Cascading" is level one.

Section 3

Level three.

Section 4

Level four.

Section 5

Level five.

Section 6

Level six.

Image

Sections can have an image or a FontAwesome icon in the header.

FontAwesome: Pie-Chart

<tc:section
    image="fa-pie-chart"
    label="FontAwesome: Pie-Chart">

Image File: feather-leaf.png

<tc:section
    image="/demo-4-snapshot/image/feather-leaf.png"
    label="Image File: feather-leaf.png">

Level

You can manually set a level for a section header. For the following section the level is set to '5'.

Level 5 Section
<tc:section label="Level 5 Section" level="5">
<?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.section} &lt;tc:section>"/> <p>A section can be added with <code class="language-markup">&lt;tc:section/></code> tag.</p> <tc:link label="Tag Library Documentation" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/section.html"/> <tc:section label="Basics"> <p>A section can have a title. It is added with the <code>label</code> attribute. This text is the content of a section.</p> <pre><code class="language-markup">&lt;tc:section label="Basics"></code></pre> </tc:section> <tc:section label="Cascading"> <p>A section can contain one or more sections. In this example, the sections are cascaded to level six.</p> <tc:section label="Section 2"> <p>Level two. The section "Cascading" is level one.</p> <tc:section label="Section 3"> <p>Level three.</p> <tc:section label="Section 4"> <p>Level four.</p> <tc:section label="Section 5"> <p>Level five.</p> <tc:section label="Section 6"> <p>Level six.</p> </tc:section> </tc:section> </tc:section> </tc:section> </tc:section> </tc:section> <tc:section label="Image"> <p>Sections can have an image or a FontAwesome icon in the header.</p> <tc:section image="fa-pie-chart" label="FontAwesome: Pie-Chart"> <pre><code class="language-markup">&lt;tc:section image="fa-pie-chart" label="FontAwesome: Pie-Chart"></code></pre> </tc:section> <tc:section image="#{request.contextPath}/image/feather-leaf.png" label="Image File: feather-leaf.png"> <pre><code class="language-markup">&lt;tc:section image="#{request.contextPath}/image/feather-leaf.png" label="Image File: feather-leaf.png"></code></pre> </tc:section> </tc:section> <tc:section label="Level"> <p>You can manually set a level for a section header. For the following section the level is set to '5'.</p> <tc:section id="sectionLevel5" label="Level 5 Section" level="5"> <pre><code class="language-markup">&lt;tc:section label="Level 5 Section" level="5"></code></pre> </tc:section> </tc:section> </ui:composition>