You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/11/25 18:53:27 UTC

svn commit: r598020 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/context/ core/src/main/java/org/apache/myfaces/tobago/util/ theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ ...

Author: bommel
Date: Sun Nov 25 09:53:22 2007
New Revision: 598020

URL: http://svn.apache.org/viewvc?rev=598020&view=rev
Log:
(TOBAGO-538) Avoid 'This page contains both secure and nonsecure items' messages in IE on https pages

Added:
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html   (with props)
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MimeTypeUtils.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java?rev=598020&r1=598019&r2=598020&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java Sun Nov 25 09:53:22 2007
@@ -57,6 +57,11 @@
         .getImage(facesContext.getViewRoot(), name);
   }
 
+  public static String getBlankPage(FacesContext context) {
+    return  context.getExternalContext().getRequestContextPath()
+        + "/org/apache/myfaces/tobago/renderkit/html/standard/blank.html";
+  }
+
   /**
    * Searchs for an image and return it with the context path
    */

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MimeTypeUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MimeTypeUtils.java?rev=598020&r1=598019&r2=598020&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MimeTypeUtils.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MimeTypeUtils.java Sun Nov 25 09:53:22 2007
@@ -41,6 +41,8 @@
       return "text/css";
     } else if (file.endsWith(".ico")) {
       return "image/vnd.microsoft.icon";
+    } else if (file.endsWith("blank.html")) {
+      return "text/html";
     }
     return null;
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java?rev=598020&r1=598019&r2=598020&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java Sun Nov 25 09:53:22 2007
@@ -36,7 +36,13 @@
     writer.startElement(HtmlConstants.IFRAME, component);
     writer.writeIdAttribute(component.getClientId(facesContext));
     writer.writeNameAttribute(component.getClientId(facesContext));
-    writer.writeAttributeFromComponent(HtmlAttributes.SRC, ATTR_SRC);
+    Object src = component.getAttributes().get(ATTR_SRC);
+    if (src != null) {
+      writer.writeAttribute(HtmlAttributes.SRC, String.valueOf(src), true);
+    } else {
+      //writer.writeAttribute(HtmlAttributes.SRC, "javascript:false;", false);
+      writer.writeAttribute(HtmlAttributes.SRC, ResourceManagerUtil.getBlankPage(facesContext), false);
+    }
     writer.writeClassAttribute();
     writer.writeStyleAttribute();
 

Added: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html?rev=598020&view=auto
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html (added)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html Sun Nov 25 09:53:22 2007
@@ -0,0 +1,4 @@
+<html>
+<body>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/blank.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL