myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1461893 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
Date Wed, 27 Mar 2013 23:19:01 GMT
Author: lu4242
Date: Wed Mar 27 23:19:01 2013
New Revision: 1461893

URL: http://svn.apache.org/r1461893
Log:
MYFACES-3696 Button rendering itself after ajax request loses type and other attributes

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java?rev=1461893&r1=1461892&r2=1461893&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
Wed Mar 27 23:19:01 2013
@@ -189,7 +189,10 @@ public class ResourceUtils
 
         // Check if this is an ajax request. If so, we don't need to include it, because
that was
         // already done and in the worst case, jsf script was already loaded on the page.
-        if (facesContext.getPartialViewContext() != null && facesContext.getPartialViewContext().isAjaxRequest())
+        if (facesContext.getPartialViewContext() != null && 
+                (facesContext.getPartialViewContext().isPartialRequest() ||
+                 facesContext.getPartialViewContext().isAjaxRequest() )
+            )
         {
             return;
         }
@@ -246,7 +249,10 @@ public class ResourceUtils
         //we only are allowed to do this on partial requests
         //because on normal requests a static viewroot still could mean that a full page
refresh is performed
         //only in a ppr case this means we have the script already loaded and parsed
-        if (facesContext.getPartialViewContext() != null && facesContext.getPartialViewContext().isPartialRequest())
+        if (facesContext.getPartialViewContext() != null && 
+                (facesContext.getPartialViewContext().isPartialRequest() ||
+                 facesContext.getPartialViewContext().isAjaxRequest() )
+            )
         {
             return;
         }



Mime
View raw message