You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/04/16 20:04:29 UTC

svn commit: r1326710 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java

Author: hlship
Date: Mon Apr 16 18:04:29 2012
New Revision: 1326710

URL: http://svn.apache.org/viewvc?rev=1326710&view=rev
Log:
TAP5-1906: Interaction between client-side validation and submit buttons can result in a server-side error parsing JSON array

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java?rev=1326710&r1=1326709&r2=1326710&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java Mon Apr 16 18:04:29 2012
@@ -574,7 +574,7 @@ public class Form implements ClientEleme
 
         String raw = request.getParameter(SUBMITTING_ELEMENT_ID);
 
-        if (raw != null &&
+        if (InternalUtils.isNonBlank(raw) &&
                 new JSONArray(raw).getString(1).equals(InternalConstants.CANCEL_NAME))
         {
             return true;