blob: 7a19852011a618d4eb1051a5c4f20d1c7d2365fd [file] [log] [blame]
<?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"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<p>For more complex headers, which can span over columns and/or rows use a
<code class="language-markup">&lt;f:facet name="header"></code>in the sheet.
The facet could be filled with <code class="language-markup">&lt;tc:out/></code> tags
to set the names of the header.
Such an output field tag may also contain
<code class="language-markup">&lt;tc:gridLayoutConstraint columnSpan="..."/></code>
or
<code class="language-markup">&lt;tc:gridLayoutConstraint rowSpan="..."/></code>
to set a span over columns or rows.</p>
<p>Tag Library Documentation:
<tc:link label="&lt;tc:sheet/>" image="#{request.contextPath}/image/feather-leaf.png"
link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/sheet.html"/>
|
<tc:link label="&lt;tc:column/>" image="#{request.contextPath}/image/feather-leaf.png"
link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/column.html"/>
|
<tc:link label="&lt;tc:gridLayoutConstraint/>" image="#{request.contextPath}/image/feather-leaf.png"
link="#{apiController.tldBase}/#{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>
<demo-highlight language="markup">&lt;tc:sheet value="\#{sheetController.solarList}" var="luminary" rows="11"
columns="3fr 2fr 30px 2fr 2fr 2fr 2fr 2fr 2fr" markup="bordered">
&lt;f:facet name="header">
&lt;tc:out value="Name">
&lt;tc:span row="3"/>
&lt;/tc:out>
&lt;tc:out value="Information">
&lt;tc:gridLayoutConstraint columnSpan="2"/>
...</demo-highlight>
<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:gridLayoutConstraint rowSpan="3"/>
</tc:out>
<tc:out value="Information">
<tc:gridLayoutConstraint columnSpan="2"/>
</tc:out>
<tc:out value="Data">
<tc:gridLayoutConstraint columnSpan="4"/>
</tc:out>
<tc:out value="Discovery">
<tc:gridLayoutConstraint columnSpan="2"/>
</tc:out>
<tc:out value="Orbit">
<tc:gridLayoutConstraint columnSpan="3"/>
</tc:out>
<tc:out value="Orb">
<tc:gridLayoutConstraint columnSpan="3"/>
</tc:out>
<tc:out value="Name">
<tc:gridLayoutConstraint rowSpan="2"/>
</tc:out>
<tc:out value="Year">
<tc:gridLayoutConstraint rowSpan="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>