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 2008/03/31 23:53:17 UTC

svn commit: r643168 - /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js

Author: hlship
Date: Mon Mar 31 14:53:16 2008
New Revision: 643168

URL: http://svn.apache.org/viewvc?rev=643168&view=rev
Log:
TAPESTRY-2319: Add support for client-side form-level validation

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js?rev=643168&r1=643167&r2=643168&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js Mon Mar 31 14:53:16 2008
@@ -286,9 +286,14 @@
     // This is added to all Elements, but really only applys to form control elements. This method is invoked
     // when a validation error is associated with a field. This gives the field a chance to decorate itself, its label
     // and its icon.
-    decorateForValidationError : function (element, message)
+    decorateForValidationError : function(element, message)
     {
         Tapestry.getFieldEventManager(element).addDecorations(message);
+    },
+
+    removeDecorations : function(element)
+    {
+        Tapestry.getFieldEventManager(element).removeDecorations();
     },
 
     // Checks to see if an element is truly visible, meaning the receiver and all