You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/10/15 04:52:27 UTC
svn commit: r464102 - in /tapestry/tapestry4/trunk:
tapestry-contrib/src/java/org/apache/tapestry/contrib/form/
tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/
tapestry-contrib/src/site/ tapestry-contrib/src/site/xdoc/componentr...
Author: jkuhnert
Date: Sat Oct 14 19:52:26 2006
New Revision: 464102
URL: http://svn.apache.org/viewvc?view=rev&rev=464102
Log:
More documentation fixes/enhancements.
Fixed MaskEdit component to work again and added sample to workbench demo.
Removed:
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableformpages.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableformrows.xml
Modified:
tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.jwc
tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.script
tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/Table.jwc
tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/table.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablecolumns.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablerows.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablevalues.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableview.xml
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/Visit.java
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.jwc?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.jwc (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.jwc Sat Oct 14 19:52:26 2006
@@ -40,7 +40,7 @@
<component id="maskEditScript" type="Script">
<binding name="maskEdit" value="ognl:components.maskEdit"/>
<binding name="maskValue" value="ognl:components.maskValue"/>
- <binding name="script" value="MaskEdit.script"/>
+ <binding name="script" value="literal:MaskEdit.script"/>
</component>
</component-specification>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.script
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.script?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
Binary files - no diff available.
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/Table.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/Table.jwc?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/Table.jwc (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/components/Table.jwc Sat Oct 14 19:52:26 2006
@@ -222,7 +222,6 @@
<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>
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=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/site.xml Sat Oct 14 19:52:26 2006
@@ -51,8 +51,6 @@
<item name="SimpleTableColumnFormComponent" href="/componentreference/simpletablecolumnformcomponent.html" />
<item name="Table" href="/componentreference/table.html" />
<item name="TableColumns" href="/componentreference/tablecolumns.html" />
- <item name="TableFormPages" href="/componentreference/tableformpages.html" />
- <item name="TableFormRows" href="/componentreference/tableformrows.html" />
<item name="TablePages" href="/componentreference/tablepages.html" />
<item name="TableRows" href="/componentreference/tablerows.html" />
<item name="TableValues" href="/componentreference/tablevalues.html" />
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/table.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/table.xml?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/table.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/table.xml Sat Oct 14 19:52:26 2006
@@ -32,7 +32,7 @@
define the 'class' attributes of its internal elements. If you want to change the
structure of the table, however, you can instead build your own using the lower
level components
- <a href="tablebiew.html">TableView</a>
+ <a href="tableview.html">TableView</a>
,
<a href="tablepages.html">TablePages</a>
,
@@ -333,7 +333,95 @@
parameters.
</td>
</tr>
-
+ <tr>
+ <td>keyExpression</td>
+ <td>String</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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'.
+ <br/><br/>
+ Also, use the 'defaultValue' parameter to define the object to be returned if
+ a value corresponding to a particular primary key cannot be found.
+ </td>
+ </tr>
+ <tr>
+ <td>fullSource</td>
+ <td>Object/Collection</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>defaultValue</td>
+ <td></td>
+ <td>no</td>
+ <td>null</td>
+ <td>
+ Only active in a form. The value to be used when no match for a
+ given primary key is found.
+ </td>
+ </tr>
+ <tr>
+ <td>converter</td>
+ <td></td>
+ <td>no</td>
+ <td>null</td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>primaryKeys</td>
+ <td></td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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'.
+ </td>
+ </tr>
+ <tr>
+ <td>volatile</td>
+ <td></td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>persist</td>
+ <td>String</td>
+ <td></td>
+ <td><code>literal:session</code></td>
+ <td>
+ Defines how the table state (paging and sorting) will be persisted
+ if no tableSessionStoreManager is defined.
+ <br/><br/>
+ The possible values are <code>session</code> (the default),
+ <code>client</code>, <code>client:page</code>,
+ and <code>client:app</code>.
+ </td>
+ </tr>
<tr>
<td>tableSessionStateManager</td>
<td>
@@ -391,7 +479,7 @@
<td>columnSettingsContainer</td>
<td>
<a
- href="../../tapestry-contrib/apidocs/org/apache/tapestry/IComponent.html">
+ href="../../tapestry-framework/apidocs/org/apache/tapestry/IComponent.html">
<code>IComponent</code>
</a>
</td>
@@ -402,7 +490,14 @@
source/columns mode is being used.
</td>
</tr>
-
+ <tr>
+ <td>index</td>
+ <td>Object</td>
+ <td>no</td>
+ <td></td>
+ <td>If provided, the parameter is updated with the
+ index of the loop on each iteration.</td>
+ </tr>
<tr>
<td>row</td>
<td>Object</td>
@@ -410,7 +505,6 @@
<td>Â </td>
<td>The value object of the current row being rendered.</td>
</tr>
-
<tr>
<td>column</td>
<td>
@@ -442,7 +536,34 @@
</p>
</td>
</tr>
-
+ <tr>
+ <td>pagesDisplayed</td>
+ <td>int</td>
+ <td>no</td>
+ <td>7</td>
+ <td>
+ Determines the maximum number of pages to be displayed in the page list
+ when the table has more than one page.
+ <p>
+ For example, if the table has 20 pages, and 10 is the current page,
+ pages from 7 to 13 in the page list will be shown if this parameter
+ has a value of 7.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>initialPage</td>
+ <td>
+ <code>int</code>
+ </td>
+ <td>no</td>
+ <td>0</td>
+ <td>
+ The initial page to be displayed.
+ <br/><br/>
+ This is the first page by default.
+ </td>
+ </tr>
<tr>
<td>initialSortColumn</td>
<td>
@@ -466,7 +587,6 @@
</p>
</td>
</tr>
-
<tr>
<td>initialSortOrder</td>
<td>
@@ -489,23 +609,6 @@
</p>
</td>
</tr>
-
- <tr>
- <td>pagesDisplayed</td>
- <td>int</td>
- <td>no</td>
- <td>7</td>
- <td>
- Determines the maximum number of pages to be displayed in the page list
- when the table has more than one page.
- <p>
- For example, if the table has 20 pages, and 10 is the current page,
- pages from 7 to 13 in the page list will be shown if this parameter
- has a value of 7.
- </p>
- </td>
- </tr>
-
<tr>
<td>arrowUpAsset</td>
<td>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablecolumns.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablecolumns.xml?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablecolumns.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablecolumns.xml Sat Oct 14 19:52:26 2006
@@ -60,7 +60,6 @@
<code>align:center</code>
.
<br />
-
You may override these definitions with your own css rules.
</p>
</span>
@@ -95,7 +94,6 @@
<td>String</td>
<td>no</td>
<td>th</td>
-
<td>The tag to use to wrap the column headers.</td>
</tr>
@@ -109,8 +107,7 @@
</td>
<td>no</td>
<td>Â </td>
-
- <td>The object representing the current column.</td>
+ <td>The column currently being rendered [out]</td>
</tr>
<tr>
@@ -135,10 +132,19 @@
</td>
<td>no</td>
<td>Â </td>
-
<td>The image to use to describe a column sorted in a descending order.</td>
</tr>
+
+ <tr>
+ <td>class</td>
+ <td>
+ String
+ </td>
+ <td>no</td>
+ <td>Â </td>
+ <td>The css class name to apply to each th element.</td>
+ </tr>
</table>
<p>
@@ -148,7 +154,7 @@
<p>
Informal parameters:
- <strong>allowed</strong>
+ <strong>allowed,inherited</strong>
</p>
<p>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablerows.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablerows.xml?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablerows.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablerows.xml Sat Oct 14 19:52:26 2006
@@ -76,7 +76,15 @@
<td>The value object of the current row being rendered.</td>
</tr>
-
+ <tr>
+ <td>index</td>
+ <td>
+ Object
+ </td>
+ <td>no</td>
+ <td></td>
+ <td>If provided, the parameter is updated with the index of the loop on each iteration.</td>
+ </tr>
<tr>
<td>element</td>
<td>
@@ -90,7 +98,92 @@
<td>The tag to use to wrap the rows in.</td>
</tr>
-
+ <tr>
+ <td>keyExpression</td>
+ <td>
+ Object
+ </td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>fullSource</td>
+ <td>
+ Object/Collection
+ </td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>defaultValue</td>
+ <td>
+ Object
+ </td>
+ <td>no</td>
+ <td>null</td>
+ <td>
+ Only active in a form. The value to be used when
+ no match for a given primary key is found.
+ </td>
+ </tr>
+ <tr>
+ <td>converter</td>
+ <td>
+ Object
+ </td>
+ <td>no</td>
+ <td>null</td>
+ <td>
+ 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.
+ </td>
+ </tr>
+ <tr>
+ <td>primaryKeys</td>
+ <td>
+ Object
+ </td>
+ <td>no</td>
+ <td></td>
+ <td>
+ 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'.
+ </td>
+ </tr>
+ <tr>
+ <td>volatile</td>
+ <td>
+ boolean
+ </td>
+ <td>no</td>
+ <td>false</td>
+ <td>
+ 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.
+ </td>
+ </tr>
</table>
<p>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablevalues.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablevalues.xml?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablevalues.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tablevalues.xml Sat Oct 14 19:52:26 2006
@@ -96,7 +96,15 @@
<td>The tag to use to wrap the column values in.</td>
</tr>
-
+ <tr>
+ <td>class</td>
+ <td>
+ String
+ </td>
+ <td>no</td>
+ <td></td>
+ <td>The CSS class that will be applied to each table value <code><td></code></td>
+ </tr>
</table>
<p>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableview.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableview.xml?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableview.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/site/xdoc/componentreference/tableview.xml Sat Oct 14 19:52:26 2006
@@ -214,7 +214,6 @@
<th>Default</th>
<th>Description</th>
</tr>
-
<tr>
<td>source</td>
<td>
@@ -323,7 +322,20 @@
columns parameters.
</td>
</tr>
-
+ <tr>
+ <td>persist</td>
+ <td>String</td>
+ <td></td>
+ <td><code>literal:session</code></td>
+ <td>
+ Defines how the table state (paging and sorting) will be persisted
+ if no tableSessionStoreManager is defined.
+ <br/><br/>
+ The possible values are <code>session</code> (the default),
+ <code>client</code>, <code>client:page</code>,
+ and <code>client:app</code>.
+ </td>
+ </tr>
<tr>
<td>tableSessionStateManager</td>
<td>
@@ -431,7 +443,21 @@
or another neutral tag and manually define the table.
</td>
</tr>
-
+ <tr>
+ <td>columnSettingsContainer</td>
+ <td>
+ <a
+ href="../../tapestry-framework/apidocs/org/apache/tapestry/IComponent.html">
+ <code>IComponent</code>
+ </a>
+ </td>
+ <td>no</td>
+ <td>container</td>
+ <td>
+ The container used to look up Blocks and messages when the
+ source/columns mode is being used.
+ </td>
+ </tr>
</table>
<p>
Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html Sat Oct 14 19:52:26 2006
@@ -56,6 +56,11 @@
<th><label jwcid="@FieldLabel" accessKey="z" field="component:zipCode"/></th>
<td><input jwcid="zipCode" /></td>
</tr>
+
+ <tr>
+ <th><label for="phone" accessKey="p">Phone</label></th>
+ <td><input jwcid="phone" /></td>
+ </tr>
<tr>
<th><label jwcid="@FieldLabel" accesskey="a" field="component:textArea"/></th>
Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/Fields.page Sat Oct 14 19:52:26 2006
@@ -98,6 +98,11 @@
<binding name="displayName" value="message:zip-code-label"/>
</component>
+ <component id="phone" type="contrib:MaskEdit">
+ <binding name="value" value="visit.phone"/>
+ <binding name="mask" value="literal:(###) ###-####"/>
+ </component>
+
<component id="textArea" type="TextArea">
<binding name="value" value="visit.textValue"></binding>
<binding name="validators" value="validators:required,minLength=20"/>
Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/Visit.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/Visit.java?view=diff&rev=464102&r1=464101&r2=464102
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/Visit.java (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/Visit.java Sat Oct 14 19:52:26 2006
@@ -65,6 +65,25 @@
private String _textValue;
private String _zipCode;
+
+ private String _phone;
+
+ /**
+ * @return the phone
+ */
+ public String getPhone()
+ {
+ return _phone;
+ }
+
+
+ /**
+ * @param phone the phone to set
+ */
+ public void setPhone(String phone)
+ {
+ _phone = phone;
+ }
public String getActiveTabName()
{