You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2007/02/02 23:03:58 UTC

svn commit: r502768 - in /tapestry/tapestry4/trunk/tapestry-contrib/src: java/org/apache/tapestry/contrib/ java/org/apache/tapestry/contrib/table/components/inserted/ site/ site/xdoc/componentreference/

Author: andyhot
Date: Fri Feb  2 14:03:57 2007
New Revision: 502768

URL: http://svn.apache.org/viewvc?view=rev&rev=502768
Log:
TAPESTRY-958: Useful components when overriding column display in contrib:Table

Added:
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.html
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.java
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.jwc
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.html
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.java
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.jwc
    tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortimage.xml
    tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortlink.xml
Modified:
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/Contrib.library
    tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml

Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/Contrib.library
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/Contrib.library?view=diff&rev=502768&r1=502767&r2=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/Contrib.library (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/Contrib.library Fri Feb  2 14:03:57 2007
@@ -37,6 +37,7 @@
   <component-type type="NumericField" specification-path="valid/NumericField.jwc"/>
   <component-type type="ValidatingTextField" specification-path="valid/ValidatingTextField.jwc"/>
   <component-type type="FormConditional" specification-path="form/FormConditional.jwc"/>
+  
   <component-type type="Table" specification-path="table/components/Table.jwc"/>
   <component-type type="TableColumns" specification-path="table/components/TableColumns.jwc"/>
   <component-type type="TablePages" specification-path="table/components/TablePages.jwc"/>
@@ -51,6 +52,11 @@
     specification-path="table/components/inserted/SimpleTableColumnComponent.jwc"/>
   <component-type type="SimpleTableColumnFormComponent" 
     specification-path="table/components/inserted/SimpleTableColumnFormComponent.jwc"/>
+  <component-type type="ColumnSortLink" 
+    specification-path="table/components/inserted/SimpleTableColumnSortLink.jwc"/>
+  <component-type type="ColumnSortImage" 
+    specification-path="table/components/inserted/SimpleTableColumnSortImage.jwc"/>    
+    
   <component-type type="Tree" specification-path="tree/components/Tree.jwc"/>
   <component-type type="TreeDataView" specification-path="tree/components/TreeDataView.jwc"/>
   <component-type type="TreeNodeView" specification-path="tree/components/TreeNodeView.jwc"/>

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.html?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.html (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.html Fri Feb  2 14:03:57 2007
@@ -0,0 +1,17 @@
+<!--
+   Copyright 2004 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.
+-->
+
+<html jwcid="$content$"><span jwcid="condSort"><img jwcid="imageSort" /></span></html>

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.java?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.java (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.java Fri Feb  2 14:03:57 2007
@@ -0,0 +1,123 @@
+// 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.
+
+package org.apache.tapestry.contrib.table.components.inserted;
+
+import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.tapestry.BaseComponent;
+import org.apache.tapestry.IAsset;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.Tapestry;
+import org.apache.tapestry.contrib.table.components.Table;
+import org.apache.tapestry.contrib.table.components.TableColumns;
+import org.apache.tapestry.contrib.table.components.TableMessages;
+import org.apache.tapestry.contrib.table.model.ITableColumn;
+import org.apache.tapestry.contrib.table.model.ITableModel;
+import org.apache.tapestry.contrib.table.model.ITableModelSource;
+import org.apache.tapestry.contrib.table.model.ITableRendererListener;
+import org.apache.tapestry.contrib.table.model.ITableSortingState;
+import org.apache.tapestry.event.PageDetachListener;
+import org.apache.tapestry.event.PageEvent;
+
+/**
+ * A component that renders the proper sort image for the current column - to be 
+ * used with contrib:Table when customizing a column's header.
+ * 
+ * @author Andreas Andreou
+ */
+public abstract class SimpleTableColumnSortImage extends BaseComponent
+        implements PageDetachListener, ITableRendererListener
+{
+    public abstract Table getTable();
+
+    // transient
+    private ITableModelSource m_objModelSource;
+    private ITableColumn m_objColumn;
+
+    public SimpleTableColumnSortImage()
+    {
+        init();
+    }
+
+    /**
+     * @see org.apache.tapestry.event.PageDetachListener#pageDetached(PageEvent)
+     */
+    public void pageDetached(PageEvent arg0)
+    {
+        init();
+    }
+
+    private void init()
+    {
+        m_objModelSource = null;
+        m_objColumn = null;
+    }
+
+    /**
+     * @see org.apache.tapestry.contrib.table.model.ITableRendererListener#initializeRenderer(IRequestCycle,
+     *      ITableModelSource, ITableColumn, Object)
+     */
+    public void initializeRenderer(IRequestCycle objCycle,
+            ITableModelSource objSource, ITableColumn objColumn, Object objRow)
+    {
+        m_objModelSource = objSource;
+        m_objColumn = objColumn;
+    }
+    
+     public void prepareForRender(IRequestCycle cycle)
+     {         
+         if (getTable()==null)
+            throw Tapestry.createRequiredParameterException(this, "table");
+         
+         m_objModelSource = getTable();
+         m_objColumn = getTable().getTableColumn();
+                  
+     }
+         
+
+    public ITableModel getTableModel()
+    {
+        return m_objModelSource.getTableModel();
+    }
+
+    public IAsset getSortImage()
+    {
+        IAsset objImageAsset;
+
+        IRequestCycle objCycle = getPage().getRequestCycle();
+        ITableSortingState objSortingState = getTableModel().getSortingState();
+        if (objSortingState.getSortOrder() == ITableSortingState.SORT_ASCENDING)
+        {
+            objImageAsset = (IAsset) objCycle
+                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_UP_ATTRIBUTE);
+            if (objImageAsset == null) objImageAsset = getAsset("sortUp");
+        }
+        else
+        {
+            objImageAsset = (IAsset) objCycle
+                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE);
+            if (objImageAsset == null) objImageAsset = getAsset("sortDown");
+        }
+
+        return objImageAsset;
+    }
+    
+    public boolean getIsSorted()
+    {
+        ITableSortingState objSortingState = getTableModel().getSortingState();
+        String strSortColumn = objSortingState.getSortColumn();
+        return m_objColumn.getColumnName().equals(strSortColumn);
+    }    
+}

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.jwc?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.jwc (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortImage.jwc Fri Feb  2 14:03:57 2007
@@ -0,0 +1,44 @@
+<?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.inserted.SimpleTableColumnSortImage">
+	
+    <description>
+        Component that displays the correct sort image for the current column.
+        No image is shown if the current column isn't the one sorted.
+    </description>
+    
+    <parameter name="table" required="true">
+        <description>The related table component</description>
+    </parameter>    
+
+    <component id="imageSort" type="Image" inherit-informal-parameters="true">
+        <binding name="image" value="sortImage"/>
+    </component>
+    
+    <component id="condSort" type="If">
+        <binding name="condition" value="isSorted"/>
+        <binding name="renderTag" value="false" />
+    </component>    
+	
+    <asset name="sortDown" path="arrow-down.gif"/>
+    <asset name="sortUp" path="arrow-up.gif"/>
+</component-specification>
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.html?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.html (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.html Fri Feb  2 14:03:57 2007
@@ -0,0 +1,17 @@
+<!--
+   Copyright 2004 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.
+-->
+
+<span jwcid="$content$"><a jwcid="linkColumn"><span jwcid="@RenderBody"/></a></span>

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.java?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.java (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.java Fri Feb  2 14:03:57 2007
@@ -0,0 +1,99 @@
+// 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.
+
+package org.apache.tapestry.contrib.table.components.inserted;
+
+import org.apache.tapestry.BaseComponent;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.Tapestry;
+import org.apache.tapestry.contrib.table.components.Table;
+import org.apache.tapestry.contrib.table.model.ITableColumn;
+import org.apache.tapestry.contrib.table.model.ITableModelSource;
+import org.apache.tapestry.contrib.table.model.ITableRendererListener;
+import org.apache.tapestry.event.PageDetachListener;
+import org.apache.tapestry.event.PageEvent;
+import org.apache.tapestry.util.ComponentAddress;
+
+/**
+ * A component that renders a sorting link - to be used with contrib:Table when 
+ * customizing a column's header.
+ * 
+ * 
+ * @author andyhot
+ */
+public abstract class SimpleTableColumnSortLink extends BaseComponent
+        implements ITableRendererListener, PageDetachListener
+{
+    public abstract Table getTable();
+    
+    // transient
+    private ITableColumn m_objColumn;
+    private ITableModelSource m_objModelSource;
+
+    public SimpleTableColumnSortLink()
+    {
+        init();
+    }
+
+    /**
+     * @see org.apache.tapestry.event.PageDetachListener#pageDetached(PageEvent)
+     */
+    public void pageDetached(PageEvent arg0)
+    {
+        init();
+    }
+
+    private void init()
+    {
+        m_objColumn = null;
+        m_objModelSource = null;
+    }
+    
+     public void prepareForRender(IRequestCycle cycle)
+     {
+         if (getTable()==null)
+            throw Tapestry.createRequiredParameterException(this, "table");
+         m_objModelSource = getTable();
+         m_objColumn = getTable().getTableColumn();         
+     }
+
+    /**
+     * @see org.apache.tapestry.contrib.table.model.ITableRendererListener#initializeRenderer(IRequestCycle,
+     *      ITableModelSource, ITableColumn, Object)
+     */
+    public void initializeRenderer(IRequestCycle objCycle,
+            ITableModelSource objSource, ITableColumn objColumn, Object objRow)
+    {
+        m_objModelSource = objSource;
+        m_objColumn = objColumn;
+    }
+
+    public Object[] getColumnSelectedParameters()
+    {
+        return new Object[] { new ComponentAddress(m_objModelSource),
+                m_objColumn.getColumnName() };
+    }
+
+    public void columnSelected(IRequestCycle objCycle)
+    {
+        Object[] arrArgs = objCycle.getListenerParameters();
+        ComponentAddress objAddr = (ComponentAddress) arrArgs[0];
+        String strColumnName = (String) arrArgs[1];
+
+        ITableModelSource objSource = (ITableModelSource) objAddr
+                .findComponent(objCycle);
+        objSource.storeTableAction(new TableActionColumnSort(strColumnName));
+    }
+
+}

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.jwc?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.jwc (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/inserted/SimpleTableColumnSortLink.jwc Fri Feb  2 14:03:57 2007
@@ -0,0 +1,37 @@
+<?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.inserted.SimpleTableColumnSortLink">
+	
+	<description>
+            Renders a link that will cause the current column to sort.
+	</description>
+        
+        <parameter name="table" required="true">
+            <description>The related table component</description>
+        </parameter>
+	
+	<component id="linkColumn" type="DirectLink" inherit-informal-parameters="true">
+		<binding name="listener" value="listener:columnSelected"/>
+		<binding name="parameters" value="columnSelectedParameters"/>
+        </component>
+            
+</component-specification>
\ No newline at end of file

Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml?view=diff&rev=502768&r1=502767&r2=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml Fri Feb  2 14:03:57 2007
@@ -41,6 +41,8 @@
                 
             <item name="Components" href="/componentreference/index.html" collapse="true">
                 <item name="CheckboxGroup" href="/componentreference/checkboxgroup.html" />
+                <item name="ColumnSortImage" href="/componentreference/columnsortimage.html" />
+                <item name="ColumnSortLink" href="/componentreference/columnsortlink.html" />                
                 <item name="ControlCheckbox" href="/componentreference/controlcheckbox.html" />
                 <item name="ControlledCheckbox" href="/componentreference/controlledcheckbox.html" />
                 <item name="DumpObject" href="/componentreference/dumpobject.html" />

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortimage.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortimage.xml?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortimage.xml (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortimage.xml Fri Feb  2 14:03:57 2007
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 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.
+-->
+<document>
+    <properties>
+        <title>ColumnSortImage</title>
+    </properties>
+    <body>
+
+        <section name="ColumnSortImage">
+
+            <p>
+                Displays the correct sort image for the current column.
+                No image is shown if that column is not the one sorted.
+            </p>
+            <p>
+                This component should only be used with <a href="table.html">contrib:Table</a>
+                and helps creating custom headers.
+            </p>
+
+            <subsection name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>table</td>
+                        <td>Table</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>The table that will include this sort image.</td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </subsection>
+
+            <subsection name="Example
+            ">
+
+                <source xml:space="preserve"><![CDATA[
+<table jwcid="tab@contrib:Table" source="ognl:@java.util.Locale@getAvailableLocales()"
+    columns="Locale:toString(), Language, Country">
+    <tr jwcid="LanguageColumnHeader@Block">
+        <a jwcid="@contrib:ColumnSortLink" table="component:tab">
+            <img jwcid="@contrib:ColumnSortImage" table="component:tab"/> Language </a>
+    </tr>
+</table>                    
+]]></source>
+                
+            </subsection>
+
+        </section>
+
+    </body>
+</document>

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortlink.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortlink.xml?view=auto&rev=502768
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortlink.xml (added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/columnsortlink.xml Fri Feb  2 14:03:57 2007
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 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.
+-->
+<document>
+    <properties>
+        <title>ColumnSortLink</title>
+    </properties>
+    <body>
+
+        <section name="ColumnSortLink">
+
+            <p>
+                Displays a link that will cause the current column to sort.
+            </p>
+            <p>
+                This component should only be used with <a href="table.html">contrib:Table</a>
+                and helps creating custom headers.
+            </p>            
+
+            <subsection name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>table</td>
+                        <td>Table</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>The table that will include this sort image.</td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </subsection>
+
+            <subsection name="Example
+            ">
+
+                <source xml:space="preserve"><![CDATA[
+<table jwcid="tab@contrib:Table" source="ognl:@java.util.Locale@getAvailableLocales()"
+    columns="Locale:toString(), Language, Country">
+    <tr jwcid="LanguageColumnHeader@Block">
+        <a jwcid="@contrib:ColumnSortLink" table="component:tab">
+            <img jwcid="@contrib:ColumnSortImage" table="component:tab"/> Language </a>
+    </tr>
+</table>                    
+]]></source>
+                
+            </subsection>
+
+        </section>
+
+    </body>
+</document>