| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2004, 2005 The Apache Software Foundation |
| |
| Licensed 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. |
| --> |
| |
| <!DOCTYPE component-specification PUBLIC |
| "-//Apache Software Foundation//Tapestry Specification 4.0//EN" |
| "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd"> |
| |
| <component-specification class="org.apache.tapestry.contrib.table.components.Table" |
| allow-body="yes" allow-informal-parameters="yes"> |
| |
| <description> |
| The main Table component that is implemented using the lower-level |
| Table components such as TableView and TableRows. |
| The component does not render its body, which makes it a good place |
| to declare Blocks defining the column appearances. |
| </description> |
| |
| <parameter name="tableModel" property="tableModelValue"> |
| <description> |
| The model describing the data to be presented by the Table component. |
| This parameter is optional, but either the 'tableModel' or both |
| 'source' and 'columns' parameters must be provided. |
| </description> |
| </parameter> |
| |
| <parameter name="source"> |
| <description> |
| The data to be displayed by the component. This parameter is available as |
| an alternative to 'tableModel' and must be used in combination with the |
| 'columns' parameter. |
| The parameter must be an array of values, a collection, an iterator, |
| or an object implementing the IBasicTableModel interface. |
| </description> |
| </parameter> |
| |
| <parameter name="columns"> |
| <description> |
| The table columns to be displayed. |
| The parameter must be an array, a list, or an Iterator of ITableColumn objects, |
| an ITableColumnModel, or a String describing the columns (see documentation). |
| </description> |
| </parameter> |
| |
| <parameter name="pageSize"> |
| <description> |
| The number of records displayed per page when source/columns are used. |
| The page size is 10 by default. |
| </description> |
| </parameter> |
| |
| <parameter name="initialPage"> |
| <description> |
| The initial page to be displayed. |
| This is the first page by default. |
| </description> |
| </parameter> |
| |
| <parameter name="initialSortColumn"> |
| <description> |
| The id of the column to initially sort the table by. |
| The column is set to null by default, i.e. there is no sorting. |
| </description> |
| </parameter> |
| |
| <parameter name="initialSortOrder"> |
| <description> |
| The order of the initial sorting. |
| Set this parameter to 'false' to sort in an ascending order |
| and to 'true' to sort in a descending one. |
| </description> |
| </parameter> |
| |
| <parameter name="tableSessionStateManager"> |
| <description> |
| The manager that controls what part of the table model will be stored in |
| the session. |
| </description> |
| </parameter> |
| |
| <parameter name="tableSessionStoreManager"> |
| <description> |
| The manager that controls where the session data will be stored. |
| </description> |
| </parameter> |
| |
| <parameter name="persist" default-value="literal:session"> |
| <description> |
| Defines how the table state (paging and sorting) will be persisted |
| if no tableSessionStoreManager is defined. |
| The possible values are 'session' (the default), 'client', 'client:page', |
| and 'client:app'. |
| </description> |
| </parameter> |
| |
| <parameter name="columnSettingsContainer" default-value="container"> |
| <description> |
| The component where Block and messages are pulled from when using source/columns. |
| </description> |
| </parameter> |
| |
| <parameter name="pagesDisplayed"> |
| <description> |
| The maximum number of pages that will be displayed in the list of table pages. |
| By default, only seven of the pages around the current one are shown. |
| </description> |
| </parameter> |
| |
| <parameter name="column"> |
| <description> |
| The column that is being rendered. This value is updated when both |
| the column headers and column values are rendered. |
| </description> |
| </parameter> |
| |
| <parameter name="row"> |
| <description> |
| The row that is being rendered. This value is null when |
| the column headers are rendered. |
| </description> |
| </parameter> |
| |
| <parameter name="index" property="indexParameter"> |
| <description> |
| If provided, the parameter is updated with the index of the loop on each iteration. |
| </description> |
| </parameter> |
| |
| <parameter name="keyExpression"> |
| <description> |
| Only active in a form. An OGNL expression that returns the primary key of the iterated value. |
| The primary keys are stored in hidden fields during rendering and are loaded from the form |
| during a rewind to ensure that the iterations remain the same. |
| This is a simpler, but a less efficient alternative of the 'converter' parameter. |
| If needed, please use in conjuction with 'fullSource' to reference objects |
| not currently present in 'source'. |
| Also, use the 'defaultValue' parameter to define the object to be returned if |
| a value corresponding to a particular primary key cannot be found. |
| </description> |
| </parameter> |
| |
| <parameter name="fullSource" property="fullSourceParameter"> |
| <description> |
| Only active in a form and in combination with the 'keyExpression' parameter. |
| If an object corresponding to a primary key stored in the form cannot be |
| found in the 'source' parameter, then the objects provided by this parameter |
| are searched for a match next. |
| </description> |
| </parameter> |
| |
| <parameter name="defaultValue" default-value="null"> |
| <description> |
| Only active in a form. The value to be used when no match for a given primary key is found. |
| </description> |
| </parameter> |
| |
| <parameter name="converter" default-value="null"> |
| <description> |
| Only active in a form. Defines how the items iterated upon |
| will be stored in the form as hidden values and how the stored information will be |
| converted back to objects. |
| This interface allows only the primary key of the items to be stored, |
| rather than the whole item. |
| </description> |
| </parameter> |
| |
| <parameter name="primaryKeys"> |
| <description> |
| Only active in a form. If provided, the parameter is automatically updated |
| before a rewind with the list of primary keys stored in the form. |
| The parameter is updated right before the iterations begin in a rewind and |
| could be used to preload the relevant objects in a provided 'converter'. |
| </description> |
| </parameter> |
| |
| <parameter name="volatile"> |
| <description> |
| Only active in a form. Determines whether to avoid creating hidden fields within a form. |
| Using this parameter may make the form structure different during render and rewind, |
| and cause exceptions as a result. Please use with caution. |
| </description> |
| </parameter> |
| |
| <parameter name="arrowUpAsset"> |
| <description> |
| The image to use to describe a column sorted in an ascending order. |
| </description> |
| </parameter> |
| |
| <parameter name="arrowDownAsset"> |
| <description> |
| The image to use to describe a column sorted in a descending order. |
| </description> |
| </parameter> |
| |
| <parameter name="pagesClass"> |
| <description>The CSS class of the table pages</description> |
| </parameter> |
| |
| <parameter name="columnsClass"> |
| <description>The CSS class of the table columns</description> |
| </parameter> |
| |
| <parameter name="rowsClass"> |
| <description>The CSS class of the table rows</description> |
| </parameter> |
| |
| <parameter name="valuesClass"> |
| <description>The CSS class of the table values</description> |
| </parameter> |
| |
| <component id="tableElement" type="Any" inherit-informal-parameters="yes"> |
| <binding name="element">literal:table</binding> |
| </component> |
| |
| <component id="condPages" type="If"> |
| <binding name="condition" value="tableModel.pageCount > 1"/> |
| <binding name="renderTag" value="false" /> |
| </component> |
| |
| <component id="ifNormalPages" type="If"> |
| <binding name="condition" value="showNormalPages"/> |
| <binding name="renderTag" value="false" /> |
| </component> |
| |
| <component id="elseFormPages" type="Else"> |
| <binding name="renderTag" value="false" /> |
| </component> |
| |
| <component id="tableView" type="TableView"> |
| <inherited-binding name="tableModel" parameter-name="tableModel"/> |
| <inherited-binding name="source" parameter-name="source"/> |
| <inherited-binding name="columns" parameter-name="columns"/> |
| <inherited-binding name="pageSize" parameter-name="pageSize"/> |
| <inherited-binding name="initialPage" parameter-name="initialPage"/> |
| <inherited-binding name="initialSortColumn" parameter-name="initialSortColumn"/> |
| <inherited-binding name="initialSortOrder" parameter-name="initialSortOrder"/> |
| <inherited-binding name="tableSessionStateManager" parameter-name="tableSessionStateManager"/> |
| <inherited-binding name="tableSessionStoreManager" parameter-name="tableSessionStoreManager"/> |
| <inherited-binding name="persist" parameter-name="persist"/> |
| <inherited-binding name="columnSettingsContainer" parameter-name="columnSettingsContainer"/> |
| <binding name="element">literal:div</binding> |
| </component> |
| |
| <component id="tablePages" type="TablePages"> |
| <inherited-binding name="pagesDisplayed" parameter-name="pagesDisplayed"/> |
| <inherited-binding name="class" parameter-name="pagesClass"/> |
| </component> |
| |
| <component id="tableFormPages" type="TableFormPages"> |
| <inherited-binding name="pagesDisplayed" parameter-name="pagesDisplayed"/> |
| <inherited-binding name="class" parameter-name="pagesClass"/> |
| </component> |
| |
| <component id="tableColumns" type="TableColumns"> |
| <inherited-binding name="column" parameter-name="column"/> |
| <inherited-binding name="class" parameter-name="columnsClass"/> |
| <inherited-binding name="arrowUpAsset" parameter-name="arrowUpAsset"/> |
| <inherited-binding name="arrowDownAsset" parameter-name="arrowDownAsset"/> |
| </component> |
| |
| <component id="tableRows" type="TableRows"> |
| <inherited-binding name="row" parameter-name="row"/> |
| <inherited-binding name="index" parameter-name="index"/> |
| <inherited-binding name="keyExpression" parameter-name="keyExpression"/> |
| <inherited-binding name="fullSource" parameter-name="fullSource"/> |
| <inherited-binding name="defaultValue" parameter-name="defaultValue"/> |
| <inherited-binding name="converter" parameter-name="converter"/> |
| <inherited-binding name="primaryKeys" parameter-name="primaryKeys"/> |
| <inherited-binding name="volatile" parameter-name="volatile"/> |
| <inherited-binding name="class" parameter-name="rowsClass"/> |
| </component> |
| |
| <component id="tableValues" type="TableValues"> |
| <inherited-binding name="column" parameter-name="column"/> |
| <inherited-binding name="class" parameter-name="valuesClass"/> |
| </component> |
| |
| </component-specification> |