| <?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.TableRows" |
| allow-body="yes" allow-informal-parameters="yes"> |
| |
| <description> |
| A low level Table component that generates the rows of the current page in the table. |
| This component must be wrapped by TableView. |
| </description> |
| |
| <parameter name="row" property="rowParameter"> |
| <description>The current row being 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="element" default-value="'tr'"> |
| <description>The tag to use to wrap the rows in, 'tr' by default.</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> |
| |
| <component id="iterRows" type="For"> |
| <binding name="source" value="tableRowsIterator"/> |
| <binding name="value" value="tableRow"/> |
| <binding name="index" value="tableIndex"/> |
| <binding name="fullSource" value="fullSource"/> |
| <binding name="renderTag" value="false" /> |
| <inherited-binding name="keyExpression" parameter-name="keyExpression"/> |
| <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"/> |
| </component> |
| |
| <component id="informal" type="Any" inherit-informal-parameters="yes"> |
| <inherited-binding name="element" parameter-name="element"/> |
| </component> |
| |
| <component id="wrapped" type="RenderBody"/> |
| |
| </component-specification> |