You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2014/10/04 01:35:57 UTC

[1/3] git commit: Add some tests related to TAP5-2391

Repository: tapestry-5
Updated Branches:
  refs/heads/master 8b8487d05 -> 40615866b


Add some tests related to TAP5-2391


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f9d6e0a6
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f9d6e0a6
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f9d6e0a6

Branch: refs/heads/master
Commit: f9d6e0a6477b71630801b7a55a66a54de997ee82
Parents: 8b8487d
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 3 16:26:30 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 3 16:27:56 2014 -0700

----------------------------------------------------------------------
 .../src/test/app1/AjaxValidationDemo.tml        | 30 +++++++++++++++++++
 .../app1/pages/AjaxValidationDemo.groovy        | 31 ++++++++++++++++++++
 .../tapestry5/integration/app1/pages/Index.java |  2 ++
 3 files changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/app1/AjaxValidationDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/AjaxValidationDemo.tml b/tapestry-core/src/test/app1/AjaxValidationDemo.tml
new file mode 100644
index 0000000..878e249
--- /dev/null
+++ b/tapestry-core/src/test/app1/AjaxValidationDemo.tml
@@ -0,0 +1,30 @@
+<html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd">
+
+    <h1>Ajax Validation</h1>
+
+    <t:zone t:id="formZone">
+
+        <t:form t:id="form" zone="^">
+
+            <t:errors/>
+
+            <t:textfield t:id="name" t:mixins="formgroup" t:clientid="name"/>
+
+            <div class="form-group">
+                <label>Validation Errors?</label>
+                <p class="form-control-static">
+                    ${tracker.hasErrors}
+                </p>
+
+            </div>
+
+
+            <t:submit class="btn btn-primary" value="Update Zone"/>
+
+        </t:form>
+
+
+    </t:zone>
+
+</html>
+

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy
new file mode 100644
index 0000000..65af647
--- /dev/null
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy
@@ -0,0 +1,31 @@
+package org.apache.tapestry5.integration.app1.pages
+
+import org.apache.tapestry5.Field
+import org.apache.tapestry5.ValidationTracker
+import org.apache.tapestry5.annotations.Environmental
+import org.apache.tapestry5.annotations.InjectComponent
+import org.apache.tapestry5.annotations.Property
+import org.apache.tapestry5.corelib.components.Zone
+
+
+class AjaxValidationDemo {
+
+    @Property
+    private String name;
+
+    @Environmental
+    @Property
+    private ValidationTracker tracker;
+
+    @InjectComponent("name")
+    private Field nameField;
+
+    @InjectComponent
+    private Zone formZone;
+
+    def onValidateFromForm() {
+        tracker.recordError nameField, "Server-side validation error."
+    }
+
+    def onSubmitFromForm() { formZone.body }
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
index f3df68f..cdd22ec 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
@@ -56,6 +56,8 @@ public class Index
 
     private static final List<Item> ITEMS = CollectionFactory
             .newList(
+                    new Item("AjaxValidationDemo", "Ajax Validation", "Demonstrated proper integration of server-side validation and client-side field decoration."),
+
                     new Item("OverrideEventHandlerDemo", "Event Handler Override Demo", "Event Handler methods overridden by sub-classes invoke base-class correctly."),
 
                     new Item("LogoSubclass", "Base class Assets in sub-classes", "Assets are resolved for the parent class if that's where the annotations are."),


[2/3] git commit: Remove outdated file

Posted by hl...@apache.org.
Remove outdated file


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d80b19f2
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d80b19f2
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d80b19f2

Branch: refs/heads/master
Commit: d80b19f26a8ec3ab680edbbe845e54e6f3727a27
Parents: f9d6e0a
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 3 16:28:08 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 3 16:28:08 2014 -0700

----------------------------------------------------------------------
 54_TODO.txt | 19 -------------------
 1 file changed, 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d80b19f2/54_TODO.txt
----------------------------------------------------------------------
diff --git a/54_TODO.txt b/54_TODO.txt
deleted file mode 100644
index dca3f18..0000000
--- a/54_TODO.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Ideas and TODOs:
-
-Include a new Java module that supports writing an exception log file on error.
-
-New module to replace tapestry-yuicompressor that is based on WRO4J.
-
-Start collecting various stats, store in RRD (round robin database), expose on Dashboard
-
-Add way to have services self describe (for dashboard and/or exception report).
-
-Add way for services to expose simple actions to the Dashboard (i.e., tie a UI button to a callback).
-
-Higher level way to assemble JavaScript inside ModuleManagerImpl and ability to feed it though minimizer? Probably not worth effort,
-as minimizer may only shrink a few spaces.
-
-Require that all assets be stored under MODULE-INF/assets/. Make @Inject @Path & related
-code smart to check in both places (in 5.4) or just MODULE-INF/ in 5.5.
-
-Make sure that all new dependencies have their LICENCE-foo.txt file included.
\ No newline at end of file


[3/3] git commit: Add release notes about the change to server-side/Ajax validation

Posted by hl...@apache.org.
Add release notes about the change to server-side/Ajax validation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/40615866
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/40615866
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/40615866

Branch: refs/heads/master
Commit: 40615866b66988ca597023f935b3a17e6728c783
Parents: d80b19f
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 3 16:33:42 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 3 16:33:42 2014 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.md | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/40615866/54_RELEASE_NOTES.md
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md
index 4b35667..c0e57c0 100644
--- a/54_RELEASE_NOTES.md
+++ b/54_RELEASE_NOTES.md
@@ -146,12 +146,23 @@ never, or always.
 
 # Breaking Changes:
 
+## clientId required for Ajax field decoration
+
+Applications that perform server-side validation of form control data (such as TextField) *as part of
+an Ajax Zone update* must now
+set the clientId parameter of the TextField in order for client-side validation decoration and error messages
+to appear.
+
+Non-Ajax requests are not affected.  Client-side validation is not affected. Only the rare case where validation
+only occurs on the server is affected; Tapestry has lost the ability to coordinate the Tapestry-generated id
+for the field (this is related to big improvements in rendering described below).
+
 ## Charset for Assets
 
 Tapestry now assumes that all text/* assets use the utf-8 character set. 
 This is generally the case for JavaScript files (the primary text asset). 
 
-## tapestry-yuicompressor is replaced by tapestry-webresources
+## tapestry-yuicompressor replaced by tapestry-webresources
 
 The tapestry-yuicompressor module has been removed and superseded by tapestry-webresources.
 


[2/3] git commit: Remove outdated file

Posted by hl...@apache.org.
Remove outdated file


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d80b19f2
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d80b19f2
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d80b19f2

Branch: refs/heads/master
Commit: d80b19f26a8ec3ab680edbbe845e54e6f3727a27
Parents: f9d6e0a
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 3 16:28:08 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 3 16:28:08 2014 -0700

----------------------------------------------------------------------
 54_TODO.txt | 19 -------------------
 1 file changed, 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d80b19f2/54_TODO.txt
----------------------------------------------------------------------
diff --git a/54_TODO.txt b/54_TODO.txt
deleted file mode 100644
index dca3f18..0000000
--- a/54_TODO.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Ideas and TODOs:
-
-Include a new Java module that supports writing an exception log file on error.
-
-New module to replace tapestry-yuicompressor that is based on WRO4J.
-
-Start collecting various stats, store in RRD (round robin database), expose on Dashboard
-
-Add way to have services self describe (for dashboard and/or exception report).
-
-Add way for services to expose simple actions to the Dashboard (i.e., tie a UI button to a callback).
-
-Higher level way to assemble JavaScript inside ModuleManagerImpl and ability to feed it though minimizer? Probably not worth effort,
-as minimizer may only shrink a few spaces.
-
-Require that all assets be stored under MODULE-INF/assets/. Make @Inject @Path & related
-code smart to check in both places (in 5.4) or just MODULE-INF/ in 5.5.
-
-Make sure that all new dependencies have their LICENCE-foo.txt file included.
\ No newline at end of file


[3/3] git commit: Add release notes about the change to server-side/Ajax validation

Posted by hl...@apache.org.
Add release notes about the change to server-side/Ajax validation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/40615866
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/40615866
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/40615866

Branch: refs/heads/master
Commit: 40615866b66988ca597023f935b3a17e6728c783
Parents: d80b19f
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 3 16:33:42 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 3 16:33:42 2014 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.md | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/40615866/54_RELEASE_NOTES.md
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md
index 4b35667..c0e57c0 100644
--- a/54_RELEASE_NOTES.md
+++ b/54_RELEASE_NOTES.md
@@ -146,12 +146,23 @@ never, or always.
 
 # Breaking Changes:
 
+## clientId required for Ajax field decoration
+
+Applications that perform server-side validation of form control data (such as TextField) *as part of
+an Ajax Zone update* must now
+set the clientId parameter of the TextField in order for client-side validation decoration and error messages
+to appear.
+
+Non-Ajax requests are not affected.  Client-side validation is not affected. Only the rare case where validation
+only occurs on the server is affected; Tapestry has lost the ability to coordinate the Tapestry-generated id
+for the field (this is related to big improvements in rendering described below).
+
 ## Charset for Assets
 
 Tapestry now assumes that all text/* assets use the utf-8 character set. 
 This is generally the case for JavaScript files (the primary text asset). 
 
-## tapestry-yuicompressor is replaced by tapestry-webresources
+## tapestry-yuicompressor replaced by tapestry-webresources
 
 The tapestry-yuicompressor module has been removed and superseded by tapestry-webresources.