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/11/09 06:47:22 UTC

[myfaces-tobago] 01/01: cleanup

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch portlet-test-cleanup
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 46f77b491ff94a07377f1e885dac452c65b401fc
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Nov 9 07:47:17 2017 +0100

    cleanup
---
 .../myfaces/tobago/internal/renderkit/renderer/PageRenderer.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
index 8622a6d..cda467f 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
@@ -164,7 +164,7 @@ public class PageRenderer extends RendererBase {
     if (!facesContext.getPartialViewContext().isAjaxRequest()) {
       final String title = page.getLabel();
 
-      if (!PortletUtils.isPortletApiAvailable() || !(response instanceof MimeResponse)) {
+      if (!portlet) {
         writer.startElement(HtmlElements.HTML);
         final Locale locale = viewRoot.getLocale();
         if (locale != null) {
@@ -342,6 +342,8 @@ public class PageRenderer extends RendererBase {
     final String clientId = page.getClientId(facesContext);
     final Application application = facesContext.getApplication();
     final ViewHandler viewHandler = application.getViewHandler();
+    final Object response = facesContext.getExternalContext().getResponse();
+    final boolean portlet = PortletUtils.isPortletApiAvailable() && response instanceof MimeResponse;
 
     // placeholder for menus
     writer.startElement(HtmlElements.DIV);
@@ -365,8 +367,7 @@ public class PageRenderer extends RendererBase {
     writer.endElement(HtmlElements.DIV);
     writer.endElement(HtmlElements.NOSCRIPT);
 
-    final Object response = facesContext.getExternalContext().getResponse();
-    if (PortletUtils.isPortletApiAvailable() && response instanceof MimeResponse) {
+    if (portlet) {
       writer.endElement(HtmlElements.DIV);
     } else {
       writer.endElement(HtmlElements.BODY);

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.