click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r828849 - in /incubator/click/trunk/click: documentation/docs/roadmap-changes.html extras/src/org/apache/click/extras/control/SubmitLink.java
Date Thu, 22 Oct 2009 20:55:06 GMT
Author: sabob
Date: Thu Oct 22 20:55:05 2009
New Revision: 828849

URL: http://svn.apache.org/viewvc?rev=828849&view=rev
Log:
fixed SubmitLink to call Form validation before submitting. CLK-586

Modified:
    incubator/click/trunk/click/documentation/docs/roadmap-changes.html
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java

Modified: incubator/click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/docs/roadmap-changes.html?rev=828849&r1=828848&r2=828849&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ incubator/click/trunk/click/documentation/docs/roadmap-changes.html Thu Oct 22 20:55:05
2009
@@ -420,6 +420,11 @@
           [<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-557">557</a>].
       </li>
       <li class="change">
+          Fixed SubmitLink to call Form javascript validation before submitting form.
+          This issue was raised and fixed by Finn Bock
+          [<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-586">586</a>].
+      </li>
+      <li class="change">
           Fixed DateField not to render help property twice.
           This issue was raised by Finn Bock
           [<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-574">574</a>].

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java?rev=828849&r1=828848&r2=828849&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
Thu Oct 22 20:55:05 2009
@@ -324,7 +324,13 @@
         }
 
         HtmlStringBuffer buffer = new HtmlStringBuffer(60);
-        buffer.append("return Click.submitLinkAction(this, '");
+        buffer.append("return");
+        if (getForm().getValidate() && getForm().getJavaScriptValidation()) {
+            buffer.append(" on_");
+            buffer.append(getForm().getId());
+            buffer.append("_submit() &&");
+        }
+        buffer.append(" Click.submitLinkAction(this, '");
         buffer.append(formName);
         buffer.append("');");
         return buffer.toString();



Mime
View raw message