| <?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://xmlns.jcp.org/jsf/facelets"> |
| |
| <p>There are several ways to display the header. |
| For simple column headers, use the attribute <code>label</code> of |
| <code class="language-markup"><tc:column></code>. |
| For more complex header which span over columns and/or rows please go to the |
| <tc:link label="Sheet Multi Header" |
| outcome="/content/20-component/080-sheet/60-multiheader/Sheet_Multi_Header.xhtml"/> section.</p> |
| <p>Tag Library Documentation: |
| <tc:link label="<tc:sheet/>" image="#{request.contextPath}/image/feather-leaf.png" |
| link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/sheet.html"/> |
| | |
| <tc:link label="<tc:column/>" image="#{request.contextPath}/image/feather-leaf.png" |
| link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/column.html"/></p> |
| |
| <tc:section label="Basics"> |
| <p>A sheet with six rows. The name of the columns is set by the <code>label</code> attribute.</p> |
| <demo-highlight language="markup"><tc:sheet value="\#{sheetController.solarList}" var="object" rows="6"> |
| <tc:column label="Name"> |
| <tc:out value="\#{object.name}"/> |
| ...</demo-highlight> |
| <tc:sheet id="simpleSheet" value="#{sheetController.solarList}" var="object" rows="6"> |
| <tc:column label="Name"> |
| <tc:out value="#{object.name}"/> |
| </tc:column> |
| <tc:column label="Orbit"> |
| <tc:out value="#{object.orbit}"/> |
| </tc:column> |
| <tc:column label="Period (Days)"> |
| <tc:out value="#{object.period}"/> |
| </tc:column> |
| <tc:column label="Discoverer"> |
| <tc:out value="#{object.discoverer}"/> |
| </tc:column> |
| <tc:column label="Year"> |
| <tc:out value="#{object.discoverYear}"/> |
| </tc:column> |
| </tc:sheet> |
| </tc:section> |
| |
| <tc:section label="Scrolling Header"> |
| <p>A sheet with ten rows and a maximal height of 500px. The header is scrollable.</p> |
| <p>To get a scrolling header, you have to set a maximal height |
| and the width of all columns must be calculated automatically.</p> |
| <demo-highlight language="markup"><tc:sheet value="\#{sheetController.solarList}" var="object" rows="10"> |
| <tc:style maxHeight="500px"/> |
| ...</demo-highlight> |
| <tc:sheet id="scrollHeaderSheet" value="#{sheetController.solarList}" var="object" rows="10"> |
| <tc:style maxHeight="500px"/> |
| <tc:column label="Name"> |
| <tc:out value="#{object.name}"/> |
| </tc:column> |
| <tc:column label="Orbit"> |
| <tc:out value="#{object.orbit}"/> |
| </tc:column> |
| <tc:column label="Period (Days)"> |
| <tc:out value="#{object.period}"/> |
| </tc:column> |
| <tc:column label="Discoverer"> |
| <tc:out value="#{object.discoverer}"/> |
| </tc:column> |
| <tc:column label="Year"> |
| <tc:out value="#{object.discoverYear}"/> |
| </tc:column> |
| </tc:sheet> |
| </tc:section> |
| |
| <tc:section label="Header always visible"> |
| <p>A sheet with ten rows and a maximal height of 500px. The header is static.</p> |
| <p>To get a static header, you have to set a maximal height and the |
| <code>columns</code> attribute must be used to set the width of the columns manually.</p> |
| <demo-highlight language="markup"><tc:sheet value="\#{sheetController.solarList}" var="object" rows="10" |
| columns="3fr 80px 20% 2fr 1fr"> |
| <tc:style maxHeight="500px"/> |
| ...</demo-highlight> |
| <tc:sheet id="alwaysVisibleHeaderSheet" value="#{sheetController.solarList}" var="object" rows="10" |
| columns="3fr 80px 20% 2fr 1fr"> |
| <tc:style maxHeight="500px"/> |
| <tc:column label="Name"> |
| <tc:out value="#{object.name}"/> |
| </tc:column> |
| <tc:column label="Orbit"> |
| <tc:out value="#{object.orbit}"/> |
| </tc:column> |
| <tc:column label="Period (Days)"> |
| <tc:out value="#{object.period}"/> |
| </tc:column> |
| <tc:column label="Discoverer"> |
| <tc:out value="#{object.discoverer}"/> |
| </tc:column> |
| <tc:column label="Year"> |
| <tc:out value="#{object.discoverYear}"/> |
| </tc:column> |
| </tc:sheet> |
| </tc:section> |
| </ui:composition> |