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 2015/10/26 09:20:58 UTC

tapestry-5 git commit: TAP5-2482, TAP5-2391, TAP5-2382: Revert "Base form control names of component's id, not allocated client-side id"

Repository: tapestry-5
Updated Branches:
  refs/heads/master 6e5dd91b4 -> 52ffacc3f


TAP5-2482, TAP5-2391, TAP5-2382: Revert "Base form control names of component's id, not allocated client-side id"

This reverts commit 22bd2c14b3c7d91ebd97cbc264882552c12044f7.


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

Branch: refs/heads/master
Commit: 52ffacc3f114c723b47ed4be60e49bc0e6cc0b9b
Parents: 6e5dd91
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Mon Oct 26 09:14:36 2015 +0100
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Mon Oct 26 09:14:36 2015 +0100

----------------------------------------------------------------------
 54_RELEASE_NOTES.md                                | 17 +++++++++--------
 .../tapestry5/corelib/base/AbstractField.java      |  2 +-
 .../tapestry5/integration/app1/AlertsTests.groovy  |  8 ++++----
 .../integration/app1/pages/ZoneFormDemo.tml        |  2 +-
 4 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/52ffacc3/54_RELEASE_NOTES.md
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md
index 6534733..4f1cd54 100644
--- a/54_RELEASE_NOTES.md
+++ b/54_RELEASE_NOTES.md
@@ -151,14 +151,15 @@ never, or always.
 
 As of version 5.4, Tapestry requires Java 1.6 at least.
 
-## Form Control names
-
-The rules for how a form control's name attribute is generated on the server has changed; previously, it was
-based on the field component's client-side id.  It is now based on the component's simple Tapestry id.
- 
-As before, the id is made unique with an optional numeric suffix; however with this change it is possible,
-in some complex Ajax-related cases (involving FormFragment or FormInjector components) for there to be name
-collisions that were not possible before.
+## 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* should bind the Zone's simpleIds parameter to true. This disables the injection of a per-request
+unique id into allocated client-side ids and client-side control names.
+
+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
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/52ffacc3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java
index cce49e4..cd56f3c 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java
@@ -194,7 +194,7 @@ public abstract class AbstractField implements Field
 
         assignedClientId = allocateClientId();
 
-        String controlName = formSupport.allocateControlName(resources.getId());
+        String controlName = formSupport.allocateControlName(assignedClientId);
 
         formSupport.storeAndExecute(this, new Setup(controlName));
         formSupport.store(this, PROCESS_SUBMISSION_ACTION);

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/52ffacc3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
index ec441c9..081445b 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
@@ -97,10 +97,10 @@ class AlertsTests extends App1TestCase {
     void ajax_update_and_remove() {
         openLinks "Alerts Demo", "Reset Alerts Storage"
 
-        def severitySelector = "css=#ajax select[name='select_0']"
-        def durationSelector = "css=#ajax select[name='select_1']"
-        def messageSelector = "css=#ajax input[name='textField']"
-        def markupSelector = "css=#ajax input[name='checkboxField']"
+        def severitySelector = "css=#ajax select[name='severity_0']"
+        def durationSelector = "css=#ajax select[name='duration_0']"
+        def messageSelector = "css=#ajax input[name='message_0']"
+        def markupSelector = "css=#ajax input[name='markup_0']"
 
         select severitySelector, "Error"
         select durationSelector, "Until Dismissed"

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/52ffacc3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml
index 373c166..203ca8b 100644
--- a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml
+++ b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml
@@ -2,7 +2,7 @@
 
     <h1>Zone Form Demo</h1>
 
-    <t:zone t:id="zone">
+    <t:zone t:id="zone" simpleids="true">
 
         <t:form zone="^" t:id="form">