You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2007/11/16 19:23:00 UTC

svn commit: r595767 - /myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml

Author: matzew
Date: Fri Nov 16 10:22:59 2007
New Revision: 595767

URL: http://svn.apache.org/viewvc?rev=595767&view=rev
Log:
Neil Pitman catched a documentation error.

Modified:
    myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml

Modified: myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml?rev=595767&r1=595766&r2=595767&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreTable.xml Fri Nov 16 10:22:59 2007
@@ -1,254 +1,254 @@
-<?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.
-	   
--->
-<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
-              xmlns:tr="http://myfaces.apache.org/trinidad"
-              xmlns:xi="http://www.w3.org/2001/XInclude"
-              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
-              xmlns:xhtml="http://www.w3.org/1999/xhtml">
-  <component>
-    <description><![CDATA[The Trinidad Table is used to display tabular data. It also supports selection (both single and multiple), sorting, record navigation and detail-disclosure.]]>
-    </description>
-    <icon>
-      <small-icon>/org/apache/myfaces/trinidadinternal/metadata/icons/table.gif</small-icon>
-    </icon>
-    <component-type>org.apache.myfaces.trinidad.CoreTable</component-type>
-    <component-class>org.apache.myfaces.trinidad.component.core.data.CoreTable</component-class>
-    <xi:include href="includes/CommonTableAttrs.xml" xpointer="/faces-config/component/*"/>
-    <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/>
-    <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/>
-    <property>
-      <description><![CDATA[whether or not to enable the show/hide all
-              links above the table,
-              which allow the user to show/hide all the detail rows.
-              To enable the detail rows, a "detailStamp" facet must be set on
-              this Table.]]>
-      </description>
-      <property-name>allDetailsEnabled</property-name>
-      <property-class>boolean</property-class>
-      <default-value>false</default-value>
-      <property-extension>
-        <mfp:unsupported-agents>phone voice</mfp:unsupported-agents>
-      </property-extension>
-    </property>
-    <component-extension>
-      <mfp:component-supertype>org.apache.myfaces.trinidad.Table</mfp:component-supertype>
-      <mfp:renderer-type>org.apache.myfaces.trinidad.Table</mfp:renderer-type>
-      <mfp:tag-name>tr:table</mfp:tag-name>
-      <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.core.data.CoreTableTag</mfp:tag-class>
-      <mfp:long-description><![CDATA[The Trinidad Table is used to display tabular data. It also supports selection
-(both single and multiple), sorting, record navigation and
-detail-disclosure.
-
-         <section name="Table Model">
-           <p>
-            The Trinidad Table component uses a model to access the data
-            in the underlying list. The specific model class is
-            <code>org.apache.myfaces.trinidad.model.CollectionModel</code>.
-            You may also use other model instances, e.g.,
-            <code>java.util.List</code>  ,
-            array, and  <code>javax.faces.model.DataModel</code>.
-            The Table will automatically convert the instance
-            into a CollectionModel.
-           </p>
-         </section>
-
-
-        <section name="Columns">
-          <P>
-            The immediate children of a Table component must all be
-            <code>&lt;tr:column&gt;</code> components. Each visible Trinidad Column
-            component creates a separate column in the Table.
-            For more information see the documentation for
-            <code>&lt;column&gt;</code>
-          </P>
-        </section>
-
-
-        <section name="Range Navigation">
-          <P>
-            When the list being displayed by a Table is huge, you can enable the Table
-            to break up the list into ranges and display a single range at a time.
-            Range controls are provided on the Table to let the user scroll to the next range,
-            or to go back to the previous range. If the total size of the list is known, a
-            control to let the user jump directly to a particular part of the list is also
-            provided on the Table. Use the Table attributes &quot;rows&quot; and &quot;first&quot; to control the
-            range navigation feature.
-            When the user changes the range, the Table fires a <code>RangeChangeEvent</code>.
-          </P>
-        </section>
-
-
-        <section name="Displaying Details">
-          <P>
-            You can configure the Table to display or hide additional details of a
-            particular row in response to a user gesture. When the details feature
-            is enabled, a new column containing a toggle (per row) will render in
-            the Table. When a toggle is activated, the details for that row are
-            displayed. When a toggle is deactivated, the details for the row are
-            hidden. The user can also display or hide the details for all rows at
-            the same time (the controls for this feature are enabled by setting
-            the &quot;allDetailsEnabled&quot; property to true.)
-          </P>
-          <P>
-            To enable the details feature set the &quot;detailStamp&quot; facet on the
-            Table. Place the components that are used to show the details (of a
-            row), inside this facet. In the following example, the Person's age is
-            displayed in the details section:
-
-            <pre>
-    <tr:table var="row">
-      <f:facet name="detailStamp">
-        <tr:outputText value="#{row.age}"/>
-      </f:facet>
-    </tr:table>
-            </pre>
-          </P>
-          <P>
-            When a detail row is shown or hidden the Table generates a
-            <code>DisclosureEvent</code>. If all detail rows are shown or hidden
-            the Table fires a <code>DisclosureAllEvent</code>.
-          </P>
-        </section>
-
-        <section name="Selection">
-          <p>
-            The selection feature of a Table lets the user select one
-            or more rows in the list.  The user can then perform some operation on
-            the selected rows by activating an appropriate ActionSource component (e.g.,
-            by clicking on a commandButton).
-          </p>
-          <p>
-            There are two types of selection - single and multiple. The type of
-            selection is determined by the "rowSelection" attribute, which
-            can be set to "single" or "multiple".
-          </p>
-        </section>
-
-        <section name="Sorting">
-          <p>
-            The Table component supports sorting columns in ascending or descending
-            order. A special 3D border on a column header lets the user know
-            that the column is sortable. When the user clicks on a column header
-            to sort a previously unsorted column, the Table sorts the
-            column data in ascending order. Subsequent clicks on the same
-            header sorts the data in the reverse order.
-          </p>
-          <p>
-        There are three requirements to enable sorting: the underlying table
-        model must support sorting, the &quot;sortProperty&quot; and &quot;sortable&quot;
-        attributes must be set on the column to enable the sort capability for
-        that column.
-          </p>
-          <P>
-            To support sorting, the <code>CollectionModel</code> instance
-            must implement the following methods:</P>
-            <pre>
-    public boolean isSortable(String propertyName)
-    public void setSortCriteria(List criteria)
-    public List getSortCriteria()
-            </pre>
-          <P>
-            If the underlying model is not a <code>CollectionModel</code>, the
-            Table automatically examines the actual data to determine which properties are
-            sortable. Any column that has data that
-            implements <code>java.lang.Comparable</code> is sortable.  This
-            automatic support cannot be nearly as efficient as coding sorting
-            directly into a <code>CollectionModel</code> (for instance,
-            by translating the sort into an &quot;ORDER BY&quot; SQL clause), but
-            is sufficient for small data sets.
-          </P>
-          <P>
-        To associate a column with a particular property-name to be used for
-        sorting purposes, use the &quot;sortProperty&quot; attribute on the column.
-        To enable the UI for sorting a particular column, set the
-        &quot;sortable&quot; property to <code>true</code>.
-            For more information see the documentation for
-            <code>&lt;column&gt;</code>.
-          </P>
-          <P>
-            In the following example,
-            both columns are sortable. Sorting the first column sorts by the
-            &quot;firstname&quot; property; sorting the second column sorts by the &quot;lastname&quot;
-            property.
-          </P>
-          <pre>
-    <tr:table value="...">
-      <tr:column sortProperty="firstname" sortable="true">
-        <f:facet name="header">
-          <tr:outputText value="Firstname" />
-        </f:facet>
-        ...
-      </tr:column>
-      <tr:column>
-        <f:facet name="header" sortProperty="lastname" sortable="true">
-          <tr:outputText value="Lastname" />
-        </f:facet>
-        ...
-      </tr:column>
-    </tr:table>
-          </pre>
-        </section>
-
-        <section name="Banding">
-          <P>
-            Banding is a technique where groups of rows (or columns)
-            are displayed with alternating background colors. This helps to
-            differentiate between adjacent rows (or columns).
-          </P>
-          <P>
-            The &quot;banding&quot; attribute on the Table controls the type of banding to
-            use.  The &quot;bandingInterval&quot; attribute controls
-            the number of consecutive rows (or columns) that are colored the same.
-          </P>
-          <P>
-            Note that the above banding attributes on the Table are ignored when
-            the &quot;bandingShade&quot; attribute is used on the Column.
-          </P>
-        </section>]]>
-      </mfp:long-description>
-      <mfp:example>
-        <mfp:source-code><![CDATA[<tr:table value="#{myManagedBean.allEmployees}"  
-   bandingInterval="2" banding="row" var="emp">
-  <tr:column>
-    <f:facet name="header">
-      <tr:outputText value="Name"/>
-    </f:facet>
-    <tr:outputText value="#{emp.ename}"/>
-  </tr:column>
-  <tr:column>
-    <f:facet name="header">
-      <tr:outputText value="Department Number"/>
-    </f:facet>
-    <tr:outputText value="#{emp.deptno}"/>
-  </tr:column>
-</tr:table>]]>
-        </mfp:source-code>
-      </mfp:example>
-      <mfp:author>Brian Albers</mfp:author>
-      <mfp:component-metadata>
-        <mfp:favorite-property>id</mfp:favorite-property>
-        <mfp:group>${md:getTranslatedString("PALETTE_DATA")}</mfp:group>
-        <mfp:preferred-children>tr:column tr:columnGroup</mfp:preferred-children>
-      </mfp:component-metadata>
-      <mfp:uix2-local-name>table</mfp:uix2-local-name>
-    </component-extension>
-  </component>
-</faces-config>
+<?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.
+	   
+-->
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:tr="http://myfaces.apache.org/trinidad"
+              xmlns:xi="http://www.w3.org/2001/XInclude"
+              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
+              xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <component>
+    <description><![CDATA[The Trinidad Table is used to display tabular data. It also supports selection (both single and multiple), sorting, record navigation and detail-disclosure.]]>
+    </description>
+    <icon>
+      <small-icon>/org/apache/myfaces/trinidadinternal/metadata/icons/table.gif</small-icon>
+    </icon>
+    <component-type>org.apache.myfaces.trinidad.CoreTable</component-type>
+    <component-class>org.apache.myfaces.trinidad.component.core.data.CoreTable</component-class>
+    <xi:include href="includes/CommonTableAttrs.xml" xpointer="/faces-config/component/*"/>
+    <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/>
+    <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/>
+    <property>
+      <description><![CDATA[whether or not to enable the show/hide all
+              links above the table,
+              which allow the user to show/hide all the detail rows.
+              To enable the detail rows, a "detailStamp" facet must be set on
+              this Table.]]>
+      </description>
+      <property-name>allDetailsEnabled</property-name>
+      <property-class>boolean</property-class>
+      <default-value>false</default-value>
+      <property-extension>
+        <mfp:unsupported-agents>phone voice</mfp:unsupported-agents>
+      </property-extension>
+    </property>
+    <component-extension>
+      <mfp:component-supertype>org.apache.myfaces.trinidad.Table</mfp:component-supertype>
+      <mfp:renderer-type>org.apache.myfaces.trinidad.Table</mfp:renderer-type>
+      <mfp:tag-name>tr:table</mfp:tag-name>
+      <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.core.data.CoreTableTag</mfp:tag-class>
+      <mfp:long-description><![CDATA[The Trinidad Table is used to display tabular data. It also supports selection
+(both single and multiple), sorting, record navigation and
+detail-disclosure.
+
+         <section name="Table Model">
+           <p>
+            The Trinidad Table component uses a model to access the data
+            in the underlying list. The specific model class is
+            <code>org.apache.myfaces.trinidad.model.CollectionModel</code>.
+            You may also use other model instances, e.g.,
+            <code>java.util.List</code>  ,
+            array, and  <code>javax.faces.model.DataModel</code>.
+            The Table will automatically convert the instance
+            into a CollectionModel.
+           </p>
+         </section>
+
+
+        <section name="Columns">
+          <P>
+            The immediate children of a Table component must all be
+            <code>&lt;tr:column&gt;</code> components. Each visible Trinidad Column
+            component creates a separate column in the Table.
+            For more information see the documentation for
+            <code>&lt;column&gt;</code>
+          </P>
+        </section>
+
+
+        <section name="Range Navigation">
+          <P>
+            When the list being displayed by a Table is huge, you can enable the Table
+            to break up the list into ranges and display a single range at a time.
+            Range controls are provided on the Table to let the user scroll to the next range,
+            or to go back to the previous range. If the total size of the list is known, a
+            control to let the user jump directly to a particular part of the list is also
+            provided on the Table. Use the Table attributes &quot;rows&quot; and &quot;first&quot; to control the
+            range navigation feature.
+            When the user changes the range, the Table fires a <code>RangeChangeEvent</code>.
+          </P>
+        </section>
+
+
+        <section name="Displaying Details">
+          <P>
+            You can configure the Table to display or hide additional details of a
+            particular row in response to a user gesture. When the details feature
+            is enabled, a new column containing a toggle (per row) will render in
+            the Table. When a toggle is activated, the details for that row are
+            displayed. When a toggle is deactivated, the details for the row are
+            hidden. The user can also display or hide the details for all rows at
+            the same time (the controls for this feature are enabled by setting
+            the &quot;allDetailsEnabled&quot; property to true.)
+          </P>
+          <P>
+            To enable the details feature set the &quot;detailStamp&quot; facet on the
+            Table. Place the components that are used to show the details (of a
+            row), inside this facet. In the following example, the Person's age is
+            displayed in the details section:
+
+            <pre>
+    <tr:table var="row">
+      <f:facet name="detailStamp">
+        <tr:outputText value="#{row.age}"/>
+      </f:facet>
+    </tr:table>
+            </pre>
+          </P>
+          <P>
+            When a detail row is shown or hidden the Table generates a
+            <code>DisclosureEvent</code>. If all detail rows are shown or hidden
+            the Table fires a <code>DisclosureAllEvent</code>.
+          </P>
+        </section>
+
+        <section name="Selection">
+          <p>
+            The selection feature of a Table lets the user select one
+            or more rows in the list.  The user can then perform some operation on
+            the selected rows by activating an appropriate ActionSource component (e.g.,
+            by clicking on a commandButton).
+          </p>
+          <p>
+            There are two types of selection - single and multiple. The type of
+            selection is determined by the "rowSelection" attribute, which
+            can be set to "single" or "multiple".
+          </p>
+        </section>
+
+        <section name="Sorting">
+          <p>
+            The Table component supports sorting columns in ascending or descending
+            order. A special 3D border on a column header lets the user know
+            that the column is sortable. When the user clicks on a column header
+            to sort a previously unsorted column, the Table sorts the
+            column data in ascending order. Subsequent clicks on the same
+            header sorts the data in the reverse order.
+          </p>
+          <p>
+        There are three requirements to enable sorting: the underlying table
+        model must support sorting, the &quot;sortProperty&quot; and &quot;sortable&quot;
+        attributes must be set on the column to enable the sort capability for
+        that column.
+          </p>
+          <P>
+            To support sorting, the <code>CollectionModel</code> instance
+            must implement the following methods:</P>
+            <pre>
+    public boolean isSortable(String propertyName)
+    public void setSortCriteria(List criteria)
+    public List getSortCriteria()
+            </pre>
+          <P>
+            If the underlying model is not a <code>CollectionModel</code>, the
+            Table automatically examines the actual data to determine which properties are
+            sortable. Any column that has data that
+            implements <code>java.lang.Comparable</code> is sortable.  This
+            automatic support cannot be nearly as efficient as coding sorting
+            directly into a <code>CollectionModel</code> (for instance,
+            by translating the sort into an &quot;ORDER BY&quot; SQL clause), but
+            is sufficient for small data sets.
+          </P>
+          <P>
+        To associate a column with a particular property-name to be used for
+        sorting purposes, use the &quot;sortProperty&quot; attribute on the column.
+        To enable the UI for sorting a particular column, set the
+        &quot;sortable&quot; property to <code>true</code>.
+            For more information see the documentation for
+            <code>&lt;column&gt;</code>.
+          </P>
+          <P>
+            In the following example,
+            both columns are sortable. Sorting the first column sorts by the
+            &quot;firstname&quot; property; sorting the second column sorts by the &quot;lastname&quot;
+            property.
+          </P>
+          <pre>
+    <tr:table value="...">
+      <tr:column sortProperty="firstname" sortable="true">
+        <f:facet name="header">
+          <tr:outputText value="Firstname" />
+        </f:facet>
+        ...
+      </tr:column>
+      <tr:column sortProperty="lastname" sortable="true">
+        <f:facet name="header">
+          <tr:outputText value="Lastname" />
+        </f:facet>
+        ...
+      </tr:column>
+    </tr:table>
+          </pre>
+        </section>
+
+        <section name="Banding">
+          <P>
+            Banding is a technique where groups of rows (or columns)
+            are displayed with alternating background colors. This helps to
+            differentiate between adjacent rows (or columns).
+          </P>
+          <P>
+            The &quot;banding&quot; attribute on the Table controls the type of banding to
+            use.  The &quot;bandingInterval&quot; attribute controls
+            the number of consecutive rows (or columns) that are colored the same.
+          </P>
+          <P>
+            Note that the above banding attributes on the Table are ignored when
+            the &quot;bandingShade&quot; attribute is used on the Column.
+          </P>
+        </section>]]>
+      </mfp:long-description>
+      <mfp:example>
+        <mfp:source-code><![CDATA[<tr:table value="#{myManagedBean.allEmployees}"  
+   bandingInterval="2" banding="row" var="emp">
+  <tr:column>
+    <f:facet name="header">
+      <tr:outputText value="Name"/>
+    </f:facet>
+    <tr:outputText value="#{emp.ename}"/>
+  </tr:column>
+  <tr:column>
+    <f:facet name="header">
+      <tr:outputText value="Department Number"/>
+    </f:facet>
+    <tr:outputText value="#{emp.deptno}"/>
+  </tr:column>
+</tr:table>]]>
+        </mfp:source-code>
+      </mfp:example>
+      <mfp:author>Brian Albers</mfp:author>
+      <mfp:component-metadata>
+        <mfp:favorite-property>id</mfp:favorite-property>
+        <mfp:group>${md:getTranslatedString("PALETTE_DATA")}</mfp:group>
+        <mfp:preferred-children>tr:column tr:columnGroup</mfp:preferred-children>
+      </mfp:component-metadata>
+      <mfp:uix2-local-name>table</mfp:uix2-local-name>
+    </component-extension>
+  </component>
+</faces-config>