You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/07/27 13:33:59 UTC
svn commit: r1803181 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
Author: lofwyr
Date: Thu Jul 27 13:33:58 2017
New Revision: 1803181
URL: http://svn.apache.org/viewvc?rev=1803181&view=rev
Log:
TOBAGO-1751: Add META-tags to <head>-tag
* workaround: drop jsf.js from WebSphere
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java?rev=1803181&r1=1803180&r2=1803181&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java Thu Jul 27 13:33:58 2017
@@ -59,6 +59,7 @@ import javax.faces.application.Applicati
import javax.faces.application.ProjectStage;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
import javax.faces.component.UIViewRoot;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
@@ -195,9 +196,17 @@ public class PageRenderer extends Render
}
for (UIComponent headResource : headComponents) {
- if (headResource instanceof UIMeta) { //workaround for WebSphere: 'headComponents' contains sheet '_header'
- headResource.encodeAll(facesContext);
+ if (headResource instanceof UIOutput) {
+ final Map<String, Object> attributes = headResource.getAttributes();
+ if ("javax.faces".equals(attributes.get("library"))
+ && "jsf.js".equals(attributes.get("name"))) {
+ // workaround for WebSphere
+ // We don't need jsf.js from the JSF impl, because Tobago comes with its own tobago-jsf.js
+ continue;
+ }
}
+
+ headResource.encodeAll(facesContext);
}
// title