myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1153266 - in /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html: HtmlButtonRendererBase.java HtmlRendererUtils.java
Date Tue, 02 Aug 2011 20:32:54 GMT
Author: lu4242
Date: Tue Aug  2 20:32:53 2011
New Revision: 1153266

URL: http://svn.apache.org/viewvc?rev=1153266&view=rev
Log:
MYFACES-3180 h:commandButton with image breaks ajax

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java?rev=1153266&r1=1153265&r2=1153266&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Tue Aug  2 20:32:53 2011
@@ -72,12 +72,12 @@ public class HtmlButtonRendererBase
             uiComponent.queueEvent(new ActionEvent(uiComponent));
 
             org.apache.myfaces.shared.renderkit.RendererUtils.initPartialValidationAndModelUpdate(uiComponent,
facesContext);
-            
-            if (uiComponent instanceof ClientBehaviorHolder &&
-                    !HtmlRendererUtils.isDisabled(uiComponent))
-            {
-                HtmlRendererUtils.decodeClientBehaviors(facesContext, uiComponent);
-            }
+        }
+        
+        if (uiComponent instanceof ClientBehaviorHolder &&
+                !HtmlRendererUtils.isDisabled(uiComponent))
+        {
+            HtmlRendererUtils.decodeClientBehaviors(facesContext, uiComponent);
         }
     }
 

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=1153266&r1=1153265&r2=1153266&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Tue Aug  2 20:32:53 2011
@@ -1751,15 +1751,20 @@ public final class HtmlRendererUtils {
         if (sourceId == null || !sourceId.equals(clientId)) {
             return false;
         }
+        boolean partialOrBehaviorSubmit = false;
         String behaviorEvent = params.get("javax.faces.behavior.event");
         if (behaviorEvent != null) {
-            return ClientBehaviorEvents.ACTION.equals(behaviorEvent);
+            partialOrBehaviorSubmit = ClientBehaviorEvents.ACTION.equals(behaviorEvent);
+            if (partialOrBehaviorSubmit)
+            {
+                return partialOrBehaviorSubmit;
+            }
         }
         String partialEvent = params.get("javax.faces.partial.event");
         if (partialEvent != null) {
-            return ClientBehaviorEvents.CLICK.equals(partialEvent);
+            partialOrBehaviorSubmit = ClientBehaviorEvents.CLICK.equals(partialEvent);
         }
-        return false;
+        return partialOrBehaviorSubmit;
     }
 
     /**



Mime
View raw message