You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2013/04/18 15:57:54 UTC

svn commit: r1469329 - /myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java

Author: lu4242
Date: Thu Apr 18 13:57:54 2013
New Revision: 1469329

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

Modified:
    myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java

Modified: myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java?rev=1469329&r1=1469328&r2=1469329&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java (original)
+++ myfaces/core/branches/2.1.x/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java Thu Apr 18 13:57:54 2013
@@ -53,6 +53,13 @@ public final class HtmlJavaScriptUtils
     public static void renderFormSubmitScript(FacesContext facesContext)
             throws IOException
     {
+        if (facesContext.getPartialViewContext() != null && 
+                (facesContext.getPartialViewContext().isPartialRequest() ||
+                 facesContext.getPartialViewContext().isAjaxRequest() )
+            )
+        {
+            return;
+        }
 
         Map map = facesContext.getExternalContext().getRequestMap();
         Boolean firstScript = (Boolean) map.get(FIRST_SUBMIT_SCRIPT_ON_PAGE);