myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1339265 - in /myfaces/extensions/cdi/trunk: examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/ jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/c...
Date Wed, 16 May 2012 16:55:49 GMT
Author: struberg
Date: Wed May 16 16:55:49 2012
New Revision: 1339265

URL: http://svn.apache.org/viewvc?rev=1339265&view=rev
Log:
EXTCDI-285 remove <body> branding feature again

It turned out that adding a bgcolor and similar causes
flickering on a few browsers. Thus I removed this 
feature again. 

Modified:
    myfaces/extensions/cdi/trunk/examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/SampleClientConfig.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/ClientSideWindowHandler.java

Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/SampleClientConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/SampleClientConfig.java?rev=1339265&r1=1339264&r2=1339265&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/SampleClientConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/SampleClientConfig.java
Wed May 16 16:55:49 2012
@@ -20,6 +20,7 @@ package org.apache.myfaces.examples.jsf2
 
 import javax.enterprise.inject.Specializes;
 import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.extensions.cdi.jsf.api.config.ClientConfig;
 
@@ -32,8 +33,10 @@ import org.apache.myfaces.extensions.cdi
 public class SampleClientConfig extends ClientConfig
 {
     @Override
-    public String getBodyAttributes()
+    public boolean isClientSideWindowHandlerRequest(FacesContext facesContext)
     {
-        return "bgcolor=\"#cccccc\"";
+        // in our sample we only serve the intermediate page
+        // to mozilla 5 compatible browsers
+        return getUserAgent(facesContext).startsWith("Mozilla/5.0");
     }
 }

Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java?rev=1339265&r1=1339264&r2=1339265&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java
Wed May 16 16:55:49 2012
@@ -47,7 +47,6 @@ import java.util.Map;
 public class ClientConfig implements Serializable
 {
     private static final long serialVersionUID = 581351549574404793L;
-    public static final String BODY_ATTRIBUTES_PLACEHOLDER = "$$bodyAttributes$$";
 
     /** We will set a cookie with this very name if a noscript link got clicked by the user
*/
     public static final String COOKIE_NAME_NOSCRIPT_ENABLED = "mfNoScriptEnabled";
@@ -133,10 +132,6 @@ public class ClientConfig implements Ser
      * The reason for this is to minimize visual side effects on browsers who do
      * not properly support html5 localstorage.
      *
-     * If you just like to change the default background color, then use
-     * {@link #getBodyAttributes()} instead. This will replace the
-     * {@link #BODY_ATTRIBUTES_PLACEHOLDER} on the windowhandler.html page.
-     *
      * @return the location of the <i>windowhandler.html</i> resource
      *         which should be sent to the users browser.
      */
@@ -146,17 +141,6 @@ public class ClientConfig implements Ser
     }
 
     /**
-     * Overwrite this method to set custom specific body attributes on the
-     * intermediate windowhandler.html page.
-     *
-     * @return
-     */
-    public String getBodyAttributes()
-    {
-        return "";
-    }
-
-    /**
      * This might return different windowhandlers based on user settings like
      * his language, an affiliation, etc
      * @return a String containing the whole windowhandler.html file.

Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/ClientSideWindowHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/ClientSideWindowHandler.java?rev=1339265&r1=1339264&r2=1339265&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/ClientSideWindowHandler.java
(original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/ClientSideWindowHandler.java
Wed May 16 16:55:49 2012
@@ -170,10 +170,6 @@ public class ClientSideWindowHandler ext
 
             String windowHandlerHtml = this.clientConfig.getWindowHandlerHtml();
 
-            // replace any background color or other body attribute setting
-            windowHandlerHtml = windowHandlerHtml.replace(ClientConfig.BODY_ATTRIBUTES_PLACEHOLDER,
-                                                          clientConfig.getBodyAttributes());
-
             if (windowId == null)
             {
                 windowId = UNINITIALIZED_WINDOW_ID_VALUE;



Mime
View raw message