A <tc:sheet/> tag can contain any number of <tc:column/> tags. The <tc:column/> tag is a container, which may contain outputfields, labels, progress bars or even tab groups.
<tc:sheet/>
<tc:column/>
Tag Library Documentation: <tc:sheet/> | <tc:column/>
Two attributes should be recognized in a sheet. The data of the sheet is set in the value attribute. The variablename of a single entry is set by the var attribute, which can be used in the <tc:column/> tags. In this example, also the rows attribute is set. So only four rows are shown at a time.
value
var
rows
In most cases, you should set labelLayout="skip" for components which have usually a label. Otherwise those components have a negative affect on the proportion of the sheet. For components with a label the attribute margin-bottom is set. The margin is add to the height of a row.
labelLayout="skip"
margin-bottom
<tc:sheet value="#{sheetController.solarList}" var="solarobject" rows="4"> <tc:column label="Name"> <tc:out value="#{solarobject.name}" labelLayout="skip"/> ...
<?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} <tc:sheet>"/> <p>A <code class="language-markup"><tc:sheet/></code> tag can contain any number of <code class="language-markup"><tc:column/></code> tags. The <code class="language-markup"><tc:column/></code> tag is a container, which may contain outputfields, labels, progress bars or even tab groups.</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"/></p> <tc:section label="Basics"> <p>Two attributes should be recognized in a sheet. The data of the sheet is set in the <code>value</code> attribute. The variablename of a single entry is set by the <code>var</code> attribute, which can be used in the <code class="language-markup"><tc:column/></code> tags. In this example, also the <code>rows</code> attribute is set. So only four rows are shown at a time.</p> <p>In most cases, you should set <code class="language-markup">labelLayout="skip"</code> for components which have usually a label. Otherwise those components have a negative affect on the proportion of the sheet.<br/> For components with a label the attribute <code class="language-css">margin-bottom</code> is set. The margin is add to the height of a row.</p> <pre><code class="language-markup"><tc:sheet value="\#{sheetController.solarList}" var="solarobject" rows="4"> <tc:column label="Name"> <tc:out value="\#{solarobject.name}" labelLayout="skip"/> ...</code></pre> <tc:sheet id="s1" value="#{sheetController.solarList}" var="object" rows="4"> <tc:style maxHeight="500px"/> <tc:column label="Name"> <tc:out value="#{object.name}" labelLayout="skip"/> </tc:column> <tc:column label="Orbit"> <tc:out value="#{object.orbit}" labelLayout="skip"/> </tc:column> <tc:column label="Period (Days)"> <tc:out value="#{object.period}" labelLayout="skip"/> </tc:column> <tc:column label="Discoverer"> <tc:out value="#{object.discoverer}" labelLayout="skip"/> </tc:column> <tc:column label="Year"> <tc:out value="#{object.discoverYear}" labelLayout="skip"/> </tc:column> </tc:sheet> </tc:section> </ui:composition>