For more complex headers, which can span over columns and/or rows use a <f:facet name="header">in the sheet. The facet could be filled with <tc:out/> tags to set the names of the header. Such an outputfield tag may also contain <tc:span column="..."/> or <tc:span row="..."/> to set a span over columns or rows.
<f:facet name="header">
<tc:out/>
<tc:span column="..."/>
<tc:span row="..."/>
Tag Library Documentation: <tc:sheet/> | <tc:column/> | <tc:span/>
For multi-header sheets, you should consider to use markup="bordered" for better appearance.
markup="bordered"
<tc:sheet value="#{sheetController.solarList}" var="luminary" rows="11" columns="3fr 2fr 30px 2fr 2fr 2fr 2fr 2fr 2fr" markup="bordered"> <f:facet name="header"> <tc:out value="Name"> <tc:span row="3"/> </tc:out> <tc:out value="Information"> <tc:span column="2"/> ...
<?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" xmlns:f="http://java.sun.com/jsf/core"> <ui:param name="title" value="#{demoBundle.sheet}"/> <p>For more complex headers, which can span over columns and/or rows use a <code class="language-markup"><f:facet name="header"></code>in the sheet. The facet could be filled with <code class="language-markup"><tc:out/></code> tags to set the names of the header. Such an outputfield tag may also contain <code class="language-markup"><tc:span column="..."/></code> or <code class="language-markup"><tc:span row="..."/></code> to set a span over columns or rows.</p> <p>Tag Library Documentation: <tc:link label="<tc:sheet/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/sheet.html"/> | <tc:link label="<tc:column/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/column.html"/> | <tc:link label="<tc:span/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/gridLayoutConstraint.html"/></p> <tc:section label="Multi-Header"> <p>For multi-header sheets, you should consider to use <code>markup="bordered"</code> for better appearance.</p> <pre><code class="language-markup"><tc:sheet value="\#{sheetController.solarList}" var="luminary" rows="11" columns="3fr 2fr 30px 2fr 2fr 2fr 2fr 2fr 2fr" markup="bordered"> <f:facet name="header"> <tc:out value="Name"> <tc:span row="3"/> </tc:out> <tc:out value="Information"> <tc:span column="2"/> ...</code></pre> <tc:sheet value="#{sheetController.solarList}" var="luminary" rows="11" columns="3fr 2fr 30px 2fr 2fr 2fr 2fr 2fr 2fr" markup="bordered"> <f:facet name="header"> <tc:panel> <tc:out value="Name"> <tc:span row="3"/> </tc:out> <tc:out value="Information"> <tc:span column="2"/> </tc:out> <tc:out value="Data"> <tc:span column="4"/> </tc:out> <tc:out value="Discovery"> <tc:span column="2"/> </tc:out> <tc:out value="Orbit"> <tc:span column="3"/> </tc:out> <tc:out value="Orb"> <tc:span column="3"/> </tc:out> <tc:out value="Name"> <tc:span row="2"/> </tc:out> <tc:out value="Year"> <tc:span row="2"/> </tc:out> <tc:out value="of"/> <tc:out value="#"/> <tc:out value="Distance [1000 km]"/> <tc:out value="Period [days]"/> <tc:out value="Inclination [°]"/> <tc:out value="Eccentricity"/> </tc:panel> </f:facet> <tc:column id="c_name" align="center" sortable="true"> <tc:out value="#{luminary.name}" labelLayout="skip"/> </tc:column> <tc:column id="c_orbit" sortable="true"> <tc:out value="#{luminary.orbit}" labelLayout="skip"/> </tc:column> <tc:column id="c_number" align="center"> <tc:out value="#{luminary.number}" labelLayout="skip"/> </tc:column> <tc:column align="right" sortable="true"> <tc:out value="#{luminary.distance}" labelLayout="skip"/> </tc:column> <tc:column align="right" sortable="true"> <tc:out value="#{luminary.period}" labelLayout="skip"/> </tc:column> <tc:column align="right" sortable="true"> <tc:out value="#{luminary.incl}" labelLayout="skip"/> </tc:column> <tc:column align="right" sortable="true"> <tc:out value="#{luminary.eccen}" labelLayout="skip"/> </tc:column> <tc:column sortable="true"> <tc:out value="#{luminary.discoverer}" labelLayout="skip"/> </tc:column> <tc:column align="center" sortable="true"> <tc:out value="#{luminary.discoverYear}" labelLayout="skip"/> </tc:column> </tc:sheet> </tc:section> </ui:composition>