tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r517052 - in /tapestry/tapestry4/trunk: tapestry-examples/Workbench/src/context/ tapestry-examples/Workbench/src/context/css/ tapestry-examples/Workbench/src/context/localization/ tapestry-examples/Workbench/src/java/org/apache/tapestry/wor...
Date Sun, 11 Mar 2007 23:58:08 GMT
Author: jkuhnert
Date: Sun Mar 11 16:58:07 2007
New Revision: 517052

URL: http://svn.apache.org/viewvc?view=rev&rev=517052
Log:
Updated l&f of workbench some & added css class attribues being set in ValidationDelegate
root to the same values set on client 
side validation so that server/client are consistent.

Modified:
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Chart.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Dates.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/ExceptionTab.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/FieldsResults.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Home.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Palette.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Redirect.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Table.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Upload.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/css/workbench.css
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/localization/Localization.html
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/WorkbenchValidationDelegate.java
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/ValidationDelegate.java

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Chart.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Chart.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Chart.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Chart.html Sun Mar 11
16:58:07 2007
@@ -1,6 +1,8 @@
 
 <span jwcid="@Border">
 
+<h2>Custom Chart Service</h2>
+
 <p>This page demonstrates using a form to drive the dynamic generation of a
 chart (courtesy of <a href="http://jcharts.sourceforge.net/">jCharts</a>).
 Enter names and values in the form and see them in the pie chart at the bottom.

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Dates.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Dates.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Dates.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Dates.html Sun Mar 11
16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Date Pickers</h2>
+
 <p>
 This page is used to demonstrate the DatePicker component. Once submitted the date values
input will be displayed below
 via an XHR request.
@@ -14,7 +16,7 @@
 <form jwcid="dateForm@Form" delegate="bean:delegate" 
 		clientValidationEnabled="ognl:clientValidationEnabled" 
 		async="true" updateComponents="dateDisplay" >
-
+		
 <table >
 <tbody>
  <tr>

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/ExceptionTab.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/ExceptionTab.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/ExceptionTab.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/ExceptionTab.html Sun
Mar 11 16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Line precise error reporting - Exception Pages</h2>
+
 <p>Tapestry has sophisticated exception reporting for when things go wrong in development.
 Exception reporting is very smart, using reflection to work backwards through
 the chain of exceptions, displaying JavaBeans properties of each exception and

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=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html Sun Mar 11
16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Fields / Form validation</h2>
+
 Tapestry includes a number of form-related components.  Tapestry components are
 responsible for reading properties when a page is rendered, to supply default values,
 and writing properties when the form is submitted; it is never necesssary to write
@@ -7,7 +9,7 @@
 
 <p>
 <form jwcid="valid@Form" focus="false">
-<input jwcid="inputEnabled"/> Enable Client Side Validation
+<input jwcid="inputEnabled"/> <em>Enable Client Side Validation</em>
 </form>
 
 <p>Input field components can perform validations on the client-side, triggered

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/FieldsResults.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/FieldsResults.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/FieldsResults.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/FieldsResults.html Sun
Mar 11 16:58:07 2007
@@ -1,6 +1,8 @@
 
 <span jwcid="@Border">
 
+<h2>Field Results</h2>
+
 <span jwcid="@If" condition="ognl:byLink">
 <b>You clicked the link on the previous form.</b>
 </span>

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Home.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Home.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Home.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Home.html Sun Mar 11
16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Tapestry Workbench</h2>
+
 <p>This is the Tapestry Workbench.  It is a testing ground for Tapestry.
 Each tab above links to a new page, or set of pages, that demonstrate Tapestry components
and
 features.</p>

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Palette.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Palette.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Palette.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Palette.html Sun Mar
11 16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Palette Selection Boxes</h2>
+
 <p>The Palette component is used to collect multiple selections, items are selected
 in the left column (available) and moved to the right column (selected).  The component
 can be configured to keep the items sorted by their visible label, their

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Redirect.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Redirect.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Redirect.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Redirect.html Sun Mar
11 16:58:07 2007
@@ -1,4 +1,7 @@
 <span jwcid="@Border">
+
+<h2>Easy Redirects</h2>
+
     <p>This page demonstrates that Tapestry can interoperate with traditional web applications.
A listener method may
         redirect to either an internal resource within the same web application, or to an
external URL.</p>
     <p> Examples:</p>

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Table.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Table.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Table.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Table.html Sun Mar 11
16:58:07 2007
@@ -1,5 +1,7 @@
 <span jwcid="@Border">
 
+<h2>Tablular data / Grid</h2>
+
 <p>
 The Table component is a facade component in the Table family. Table allows you to present
a sortable 
 and pagable table simply and easily by using only this one component.

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Upload.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Upload.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Upload.html (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Upload.html Sun Mar 11
16:58:07 2007
@@ -2,6 +2,8 @@
 
 <span jwcid="@Border">
 
+<h2>File Uploads</h2>
+
 <p>The Upload component is used as a form element and allows files to be uploaded to
Tapestry.  It can
 be freely mixed with other components in a form.</p>
 

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/css/workbench.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/css/workbench.css?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/css/workbench.css (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/css/workbench.css Sun
Mar 11 16:58:07 2007
@@ -1,6 +1,8 @@
 @import url("undohtml.css");  /* CSS to undo some default browser css that gets in the way
more than it helps */
 @import url("exception.css");
 
+h2,h1 { margin-bottom:0.85em; }
+
 SPAN.label-error {
     color: Red;
 }
@@ -85,18 +87,6 @@
 .navbar li.here {
     background-color: #fff;
 }
-
-/**
-.navbar li a {
-    text-decoration: none;
-    padding-right: 5px;
-    padding-left: 5px;
-    padding-top:6px;
-    padding-bottom: 3px;
-    display: block;
-    color: #000;
-    font-weight: bold;
-}*/
 
 .navbar li.here { 
     border-top: 1px solid #587ECC;

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/localization/Localization.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/localization/Localization.html?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/localization/Localization.html
(original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/localization/Localization.html
Sun Mar 11 16:58:07 2007
@@ -1,6 +1,8 @@
 <span jwcid="$content$">
 <span jwcid="@Border">
 
+<h2>Localization / i10n</h2>
+
 <p>
 This page allows the locale to be changed.  Localization is used to select
 the HTML template used by the page (and any components on the page).  Likewise,

Modified: tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/WorkbenchValidationDelegate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/WorkbenchValidationDelegate.java?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/WorkbenchValidationDelegate.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/java/org/apache/tapestry/workbench/WorkbenchValidationDelegate.java
Sun Mar 11 16:58:07 2007
@@ -28,54 +28,4 @@
 public class WorkbenchValidationDelegate extends ValidationDelegate
 {
 
-    private static final long serialVersionUID = -4782900422264574280L;
-
-    public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
-            IFormComponent component, IValidator validator)
-    {
-        if (isInError()) writer.attribute("class", "field-error");
-    }
-
-    public void writeSuffix(IMarkupWriter writer, IRequestCycle cycle,
-            IFormComponent component, IValidator validator)
-    {
-        if (isInError())
-        {
-            writer.print(" ");
-            writer.beginEmpty("img");
-            writer.attribute("src", "images/Warning-small.gif");
-            writer.attribute("height", 20);
-            writer.attribute("width", 20);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void writeLabelPrefix(IFormComponent component,
-            IMarkupWriter writer, IRequestCycle cycle)
-    {
-        // just prevents font tags
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void writeLabelSuffix(IFormComponent component,
-            IMarkupWriter writer, IRequestCycle cycle)
-    {
-        // just prevents font tags
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle cycle,
-            IFormComponent component)
-    {
-        if (isInError(component))
-        {
-            writer.attribute("class", "error");
-        }
-    }
 }

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/ValidationDelegate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/ValidationDelegate.java?view=diff&rev=517052&r1=517051&r2=517052
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/ValidationDelegate.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/ValidationDelegate.java
Sun Mar 11 16:58:07 2007
@@ -324,6 +324,9 @@
     public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
             IFormComponent component, IValidator validator)
     {
+        if (isInError()) {
+            writer.appendAttribute("class", "fieldInvalid");
+        }
     }
 
     /**



Mime
View raw message