You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2010/11/13 11:10:10 UTC

svn commit: r1034716 - /click/trunk/click/framework/src/org/apache/click/control/Button.java

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;