blob: bfd238aec3f6f0d612318ea5f4176d2aa0e48680 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
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.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="table Sorting Demo">
<tr:form>
<tr:panelGroupLayout layout="vertical">
<tr:panelGroupLayout layout="horizontal">
<tr:commandLink immediate="true" text="Component Guide" action="guide"/>
<tr:spacer width="10"/>
<tr:goLink destination="http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_column.html"
text="Tag Documentation"/>
<tr:spacer width="10"/>
<tr:goLink destination="http://myfaces.apache.org/trinidad/skin-selectors.html#column"
text="Skinning Key Documentation"/>
</tr:panelGroupLayout>
<tr:commandLink immediate="true" text="Column Demo" action="guide.column"/>
<tr:commandLink immediate="true" text="Column Group" action="guide.column.group"/>
<tr:commandLink immediate="true" text="RowHeader Column" action="guide.column.rowHeader"/>
<tr:commandLink immediate="true" text="Column Footer" action="guide.column.footer"/>
<tr:outputFormatted styleUsage="instruction" value="&lt;br>&lt;b>Sortable Table&lt;/b>"/>
<tr:table value="#{periodicTable.tableData}" var="row" rows="10"
summary="Element Properties">
<tr:column sortProperty="name" sortable="true">
<f:facet name="header">
<tr:outputText value="Name"/>
</f:facet>
<tr:inputText value="#{row.name}" shortDesc="{row.name}"/>
</tr:column>
<tr:column sortProperty="symbol" sortable="true">
<f:facet name="header">
<tr:outputText value="Symbol"/>
</f:facet>
<tr:inputText value="#{row.symbol}" shortDesc="{row.symbol}"/>
</tr:column>
<tr:column sortProperty="number" sortable="true">
<f:facet name="header">
<tr:outputText value="Number"/>
</f:facet>
<tr:inputText value="#{row.number}" shortDesc="#{row.number}"/>
</tr:column>
<tr:column sortProperty="group" sortable="true">
<f:facet name="header">
<tr:outputText value="Group"/>
</f:facet>
<tr:inputText value="#{row.group}" shortDesc="#{row.group}"/>
</tr:column>
</tr:table>
<tr:outputFormatted styleUsage="instruction" value="&lt;br>&lt;b>Empty Table&lt;/b>"/>
<tr:table var="row" rows="10" emptyText="No records found" summary="Empty Table">
<tr:column sortProperty="int" sortable="true">
<f:facet name="header">
<tr:outputText value="Int"/>
</f:facet>
<tr:inputText value="#{row.int}" shortDesc="#{row.int}"/>
</tr:column>
<tr:column sortProperty="string" sortable="true">
<f:facet name="header">
<tr:outputText value="String"/>
</f:facet>
<tr:inputText value="#{row.string}" shortDesc="#{row.string}"/>
</tr:column>
</tr:table>
</tr:panelGroupLayout>
</tr:form>
</tr:document>
</f:view>
</jsp:root>