click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1034716 - /click/trunk/click/framework/src/org/apache/click/control/Button.java
Date Sat, 13 Nov 2010 10:10:10 GMT
Author: sabob
Date: Sat Nov 13 10:10:10 2010
New Revision: 1034716

URL: http://svn.apache.org/viewvc?rev=1034716&view=rev
Log:
cleanup

Modified:
    click/trunk/click/framework/src/org/apache/click/control/Button.java

Modified: click/trunk/click/framework/src/org/apache/click/control/Button.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Button.java?rev=1034716&r1=1034715&r2=1034716&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Button.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Button.java Sat Nov 13 10:10:10
2010
@@ -154,23 +154,22 @@ public class Button extends Field {
     public boolean onProcess() {
         Context context = getContext();
 
-        if (!context.isAjaxRequest()) {
-            return true;
-        }
+        if (context.isAjaxRequest()) {
 
-        if (isDisabled()) {
-            // Switch off disabled property if control has incoming request
-            // parameter. Normally this means the field was enabled via JS
-            if (context.hasRequestParameter(getName())) {
-                setDisabled(false);
-            } else {
-                // If field is disabled skip process event
-                return true;
+            if (isDisabled()) {
+                // Switch off disabled property if control has incoming request
+                // parameter. Normally this means the field was enabled via JS
+                if (context.hasRequestParameter(getName())) {
+                    setDisabled(false);
+                } else {
+                    // If field is disabled skip process event
+                    return true;
+                }
             }
-        }
 
-        if (context.hasRequestParameter(getName())) {
-            dispatchActionEvent();
+            if (context.hasRequestParameter(getName())) {
+                dispatchActionEvent();
+            }
         }
 
         return true;



Mime
View raw message