click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r954168 - in /click/trunk/click: extras/src/org/apache/click/extras/control/SubmitLink.java framework/src/org/apache/click/control/Form.java
Date Sun, 13 Jun 2010 05:15:44 GMT
Author: sabob
Date: Sun Jun 13 05:15:44 2010
New Revision: 954168

URL: http://svn.apache.org/viewvc?rev=954168&view=rev
Log:
updated getJavascriptEnabled to use standard bean convention

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
    click/trunk/click/framework/src/org/apache/click/control/Form.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java?rev=954168&r1=954167&r2=954168&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/SubmitLink.java Sun Jun 13
05:15:44 2010
@@ -326,7 +326,7 @@ public class SubmitLink extends ActionLi
 
         HtmlStringBuffer buffer = new HtmlStringBuffer(60);
         buffer.append("return");
-        if (getForm().getValidate() && getForm().getJavaScriptValidation()) {
+        if (getForm().getValidate() && getForm().isJavaScriptValidation()) {
             buffer.append(" on_");
             buffer.append(getForm().getId());
             buffer.append("_submit() &&");

Modified: click/trunk/click/framework/src/org/apache/click/control/Form.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Form.java?rev=954168&r1=954167&r2=954168&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Form.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Form.java Sun Jun 13 05:15:44
2010
@@ -1636,6 +1636,17 @@ public class Form extends AbstractContai
      *
      * @return true if JavaScript client side form validation is enabled
      */
+    public boolean isJavaScriptValidation() {
+        return javaScriptValidation;
+    }
+
+    /**
+     * Return true if JavaScript client side form validation is enabled.
+     *
+     * @deprecated use {@link #isJavaScriptValidation()} instead
+     *
+     * @return true if JavaScript client side form validation is enabled
+     */
     public boolean getJavaScriptValidation() {
         return javaScriptValidation;
     }
@@ -2362,7 +2373,7 @@ public class Form extends AbstractContai
 
         appendAttributes(buffer);
 
-        if (getJavaScriptValidation()) {
+        if (isJavaScriptValidation()) {
             String javaScript = "return on_" + getId() + "_submit();";
             buffer.appendAttribute("onsubmit", javaScript);
         }
@@ -2718,7 +2729,7 @@ public class Form extends AbstractContai
 
         // Reset bypass flag to ensure it does not influence the validate flag
         bypassValidation = Boolean.FALSE;
-        if (getValidate() && getJavaScriptValidation()) {
+        if (getValidate() && isJavaScriptValidation()) {
             buffer.append("<tr style=\"display:none\" id=\"");
             buffer.append(getId());
             buffer.append("-errorsTr\"><td width='100%' align=\"");
@@ -2843,7 +2854,7 @@ public class Form extends AbstractContai
         bypassValidation = Boolean.FALSE;
 
         // Render JavaScript form validation code
-        if (getValidate() && getJavaScriptValidation()) {
+        if (getValidate() && isJavaScriptValidation()) {
             List<String> functionNames = new ArrayList<String>();
 
             buffer.append("<script type=\"text/javascript\"><!--\n");



Mime
View raw message