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 2010/08/14 03:45:31 UTC
svn commit: r985423 -
/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
Author: lu4242
Date: Sat Aug 14 01:45:31 2010
New Revision: 985423
URL: http://svn.apache.org/viewvc?rev=985423&view=rev
Log:
MYFACES-2848 AJAX responses contain <script type="text/javascript" src="/MyFaces_Test/javax.faces.resource/jsf.js.faces?ln=javax.faces">
Modified:
myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java?rev=985423&r1=985422&r2=985423&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java Sat Aug 14 01:45:31 2010
@@ -152,6 +152,13 @@ public class ResourceUtils
facesContext.getAttributes().put(RENDERED_JSF_JS, Boolean.TRUE);
return;
}
+
+ // 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().isAjaxRequest())
+ {
+ return;
+ }
// Here we have two cases:
// 1. The standard script could be put in another target (body or form).