myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjhow...@apache.org
Subject svn commit: r889288 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
Date Thu, 10 Dec 2009 15:19:17 GMT
Author: cjhoward
Date: Thu Dec 10 15:19:15 2009
New Revision: 889288

URL: http://svn.apache.org/viewvc?rev=889288&view=rev
Log:
MYFACES-2458 - Make sure AJAX call isn't emitted when <f:ajax disabled="true" />.

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java?rev=889288&r1=889287&r2=889288&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
Thu Dec 10 15:19:15 2009
@@ -83,7 +83,13 @@
 
     public String getScript(ClientBehaviorContext behaviorContext,
                             ClientBehavior behavior) {
-        return makeAjax(behaviorContext, (AjaxBehavior) behavior).toString();
+        AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;
+        
+        if (ajaxBehavior.isDisabled()) {
+            return null;
+        }
+        
+        return makeAjax(behaviorContext, ajaxBehavior).toString();
     }
 
 



Mime
View raw message