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 2014/04/01 11:06:00 UTC

svn commit: r1583579 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/context/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ ...

Author: lofwyr
Date: Tue Apr  1 09:05:59 2014
New Revision: 1583579

URL: http://svn.apache.org/r1583579
Log:
access client properties

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Classes.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java
    myfaces/tobago/trunk/tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
    myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DebugModePhaseListener.java
    myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/component/UIViewRoot.java
    myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/renderkit/html/StyleClasses.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuNodeRenderer.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java Tue Apr  1 09:05:59 2014
@@ -38,7 +38,7 @@ import java.util.Locale;
  * <p/>
  * The managed bean name which is Tobago using for the instance is {@link #MANAGED_BEAN_NAME}.
  * <p/>
- * Please use {@link org.apache.myfaces.tobago.util.VariableResolverUtils#resolveClientProperties(FacesContext)}
+ * Please use {@link ClientProperties#getInstance(javax.faces.context.FacesContext)}
  * to access to the users client properties.
  */
 
@@ -94,6 +94,9 @@ public class ClientProperties implements
     reset();
   }
 
+  /**
+   * Static method to access to the ClientProperties managed bean.
+   */
   public static ClientProperties getInstance(final FacesContext facesContext) {
     return (ClientProperties) VariableResolverUtils.resolveVariable(facesContext, MANAGED_BEAN_NAME);
   }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Tue Apr  1 09:05:59 2014
@@ -41,7 +41,6 @@ import org.apache.myfaces.tobago.layout.
 import org.apache.myfaces.tobago.layout.Orientation;
 import org.apache.myfaces.tobago.layout.PixelLayoutToken;
 import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -280,8 +279,7 @@ public abstract class AbstractUIGridLayo
         available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));
 
         if (grid.isOverflow(orientation.other())) {
-          final ClientProperties client
-              = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
+          final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
           final Measure scrollbar = orientation
               == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
           available = available.subtractNotNegative(scrollbar);

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java Tue Apr  1 09:05:59 2014
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.intern
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.context.UserAgent;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
@@ -45,7 +44,7 @@ public final class ClientPropertiesKey i
     final Map<Object, Object> attributes = facesContext.getAttributes();
     ClientPropertiesKey key = (ClientPropertiesKey) attributes.get(KEY_IN_FACES_CONTEXT);
     if (key == null) {
-      final ClientProperties clientProperties = VariableResolverUtils.resolveClientProperties(facesContext);
+      final ClientProperties clientProperties = ClientProperties.getInstance(facesContext);
       key = new ClientPropertiesKey(clientProperties, facesContext.getViewRoot());
       attributes.put(KEY_IN_FACES_CONTEXT, key);
     }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java Tue Apr  1 09:05:59 2014
@@ -23,7 +23,6 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.config.Configurable;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 
 import javax.faces.context.FacesContext;
 
@@ -114,7 +113,7 @@ public abstract class LayoutComponentRen
   }
 
   public Measure getVerticalScrollbarWeight(final FacesContext facesContext, final Configurable component) {
-    final ClientProperties clientProperties = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties clientProperties = ClientProperties.getInstance(facesContext);
     final Measure weight = clientProperties.getVerticalScrollbarWeight();
     if (weight != null) {
       return weight;

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java Tue Apr  1 09:05:59 2014
@@ -23,11 +23,11 @@ import org.apache.myfaces.tobago.ajax.Aj
 import org.apache.myfaces.tobago.application.ProjectStage;
 import org.apache.myfaces.tobago.config.TobagoConfig;
 import org.apache.myfaces.tobago.context.Capability;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper;
 import org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter;
 import org.apache.myfaces.tobago.internal.webapp.JsonResponseWriter;
 import org.apache.myfaces.tobago.internal.webapp.XmlResponseWriter;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -124,7 +124,7 @@ public class TobagoRenderKit extends Ren
     }
 
     // content type xhtml is not supported in every browser... e. g. IE 6, 7, 8
-    if (!VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance())
+    if (!ClientProperties.getInstance(FacesContext.getCurrentInstance())
         .getUserAgent().hasCapability(Capability.CONTENT_TYPE_XHTML)) {
       contentType = "text/html";
     }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Classes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Classes.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Classes.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Classes.java Tue Apr  1 09:05:59 2014
@@ -21,11 +21,11 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.commons.collections.map.MultiKeyMap;
 import org.apache.myfaces.tobago.component.SupportsMarkup;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.internal.util.StringUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -113,7 +113,7 @@ public final class Classes {
       builder.append(sub);
     }
     if (markup != null) {
-      final Theme theme = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance()).getTheme();
+      final Theme theme = ClientProperties.getInstance(FacesContext.getCurrentInstance()).getTheme();
       for (final String markupString : markup) {
         if (ignoreMarkupCheck || theme.getRenderersConfig().isMarkupSupported(rendererName, markupString)) {
           builder.append(' ');

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java Tue Apr  1 09:05:59 2014
@@ -40,9 +40,13 @@ public final class VariableResolverUtils
 
   /**
    * Returns the ClientProperties object configured in the faces-config.
+   *
+   * @deprecated Since 2.0.0. Please use
+   * {@link org.apache.myfaces.tobago.context.ClientProperties#getInstance(javax.faces.context.FacesContext)}
    */
+  @Deprecated
   public static ClientProperties resolveClientProperties(final FacesContext facesContext) {
-    return (ClientProperties) resolveVariable(facesContext, ClientProperties.MANAGED_BEAN_NAME);
+    return ClientProperties.getInstance(facesContext);
   }
   
   /**

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tue Apr  1 09:05:59 2014
@@ -32,7 +32,6 @@ import org.apache.myfaces.tobago.example
 import org.apache.myfaces.tobago.example.addressbook.Picture;
 import org.apache.myfaces.tobago.model.SelectItem;
 import org.apache.myfaces.tobago.model.SheetState;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -121,7 +120,7 @@ public class Controller implements Seria
       themeItems.add(new SelectItem(theme, theme.getDisplayName()));
     }
 
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties client = ClientProperties.getInstance(facesContext);
     theme = client.getTheme();
     currentAddressList = addressDao.findAddresses(searchCriterion);
   }
@@ -216,7 +215,7 @@ public class Controller implements Seria
 
   public String themeChanged() {
     final FacesContext facesContext = FacesContext.getCurrentInstance();
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties client = ClientProperties.getInstance(facesContext);
     client.setTheme(theme);
     return null;
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tue Apr  1 09:05:59 2014
@@ -31,7 +31,6 @@ import org.apache.myfaces.tobago.example
 import org.apache.myfaces.tobago.example.addressbook.Picture;
 import org.apache.myfaces.tobago.model.SelectItem;
 import org.apache.myfaces.tobago.model.SheetState;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.annotation.Scope;
@@ -119,7 +118,7 @@ public class Controller {
       themeItems.add(new SelectItem(theme, theme.getDisplayName()));
     }
 
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties client = ClientProperties.getInstance(facesContext);
     theme = client.getTheme();
     currentAddressList = addressDao.findAddresses(searchCriterion);
   }
@@ -214,7 +213,7 @@ public class Controller {
 
   public String themeChanged() {
     final FacesContext facesContext = FacesContext.getCurrentInstance();
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties client = ClientProperties.getInstance(facesContext);
     client.setTheme(theme);
     return null;
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Tue Apr  1 09:05:59 2014
@@ -23,7 +23,6 @@ import org.apache.myfaces.tobago.config.
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.internal.util.ObjectUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -93,16 +92,14 @@ public class ClientConfigController {
 // ///////////////////////////////////////////// logic
 
   public void storeInClientProperties() {
-    final ClientProperties client
-        = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
+    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
 
     client.setDebugMode(debugMode);
     client.setTheme(theme);
   }
 
   public void loadFromClientProperties() {
-    final ClientProperties client
-        = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
+    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
 
     debugMode = client.isDebugMode();
     theme = client.getTheme();

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java Tue Apr  1 09:05:59 2014
@@ -23,7 +23,6 @@ import org.apache.myfaces.tobago.config.
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.internal.util.ObjectUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 
 import javax.faces.application.Application;
 import javax.faces.context.FacesContext;
@@ -74,15 +73,14 @@ public class ClientConfigController {
 // ///////////////////////////////////////////// logic
 
   public void storeInClientProperties() {
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
+    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
 
     client.setDebugMode(debugMode);
     client.setTheme(theme);
   }
 
   public void loadFromClientProperties() {
-    final ClientProperties client
-        = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
+    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
 
     debugMode = client.isDebugMode();
     theme = client.getTheme();

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DebugModePhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DebugModePhaseListener.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DebugModePhaseListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DebugModePhaseListener.java Tue Apr  1 09:05:59 2014
@@ -35,7 +35,7 @@ public class DebugModePhaseListener impl
   }
 
   public void beforePhase(final PhaseEvent event) {
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(event.getFacesContext());
+    final ClientProperties client = ClientProperties.getInstance(event.getFacesContext());
     client.setDebugMode(true);
   }
 

Modified: myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/component/UIViewRoot.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/component/UIViewRoot.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/component/UIViewRoot.java Tue Apr  1 09:05:59 2014
@@ -31,7 +31,6 @@ import org.apache.myfaces.tobago.util.Fa
 import org.apache.myfaces.tobago.util.ProcessValidationsCallback;
 import org.apache.myfaces.tobago.util.TobagoCallback;
 import org.apache.myfaces.tobago.util.UpdateModelValuesCallback;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -70,7 +69,7 @@ public class UIViewRoot extends javax.fa
   @Override
   public void setLocale(final Locale locale) {
     super.setLocale(locale);
-    final ClientProperties clientProperties = VariableResolverUtils.resolveClientProperties(getFacesContext());
+    final ClientProperties clientProperties = ClientProperties.getInstance(getFacesContext());
     clientProperties.setLocale(locale);
     clientProperties.updateUserAgent(getFacesContext());
   }

Modified: myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/renderkit/html/StyleClasses.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/renderkit/html/StyleClasses.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/renderkit/html/StyleClasses.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-deprecation/src/main/java/org/apache/myfaces/tobago/renderkit/html/StyleClasses.java Tue Apr  1 09:05:59 2014
@@ -23,11 +23,11 @@ import org.apache.commons.collections.se
 import org.apache.commons.lang.StringUtils;
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.SupportsMarkup;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -160,7 +160,7 @@ public class StyleClasses implements Ser
     final Markup m = supportsMarkup.getCurrentMarkup();
     if (m != null) {
       for (final String markup : m) {
-        final Theme theme = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance()).getTheme();
+        final Theme theme = ClientProperties.getInstance(FacesContext.getCurrentInstance()).getTheme();
         if (theme.getRenderersConfig().isMarkupSupported(rendererName, markup)) {
           addMarkupClass(rendererName, sub, markup);
         } else if ("none".equals(markup)) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java Tue Apr  1 09:05:59 2014
@@ -23,6 +23,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.UIBox;
 import org.apache.myfaces.tobago.component.UIMenuBar;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.BoxRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -31,7 +32,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -89,7 +89,7 @@ public class BoxRenderer extends BoxRend
       RenderUtils.encode(facesContext, toolbar);
       writer.endElement(HtmlElements.DIV);
       writer.endElement(HtmlElements.DIV);
-      if (VariableResolverUtils.resolveClientProperties(facesContext).getUserAgent().isMsie()) {
+      if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
 // XXX check for what is this, and delete or comment it
         contentStyle.setTop(Measure.valueOf(-10));
       }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java Tue Apr  1 09:05:59 2014
@@ -52,7 +52,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.util.EncodeUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.apache.myfaces.tobago.webapp.Secret;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.slf4j.Logger;
@@ -118,7 +117,7 @@ public class PageRenderer extends PageRe
             LOG.debug("Ignoring strange scrollbarWeight: vertical=" + vertical + " horizontal=" + horizontal);
           }
         } else {
-          final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+          final ClientProperties client = ClientProperties.getInstance(facesContext);
           client.setVerticalScrollbarWeight(vertical);
           client.setHorizontalScrollbarWeight(horizontal);
         }
@@ -177,7 +176,7 @@ public class PageRenderer extends PageRe
     final String contentType = writer.getContentTypeWithCharSet();
     ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
     final String clientId = page.getClientId(facesContext);
-    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
+    final ClientProperties client = ClientProperties.getInstance(facesContext);
     final ProjectStage projectStage = tobagoConfig.getProjectStage();
     final boolean developmentMode = projectStage == ProjectStage.Development;
     final boolean debugMode = client.isDebugMode() || developmentMode;
@@ -501,11 +500,11 @@ public class PageRenderer extends PageRe
     }
 
     final String clientId = page.getClientId(facesContext);
-    final boolean debugMode = VariableResolverUtils.resolveClientProperties(facesContext).isDebugMode();
-
+    final ClientProperties clientProperties = ClientProperties.getInstance(facesContext);
+    final boolean debugMode = clientProperties.isDebugMode();
 
     // avoid submit page in ie if the form contains only one input and you press the enter key in the input
-    if (VariableResolverUtils.resolveClientProperties(facesContext).getUserAgent().isMsie()) {
+    if (clientProperties.getUserAgent().isMsie()) {
       writer.startElement(HtmlElements.INPUT, null);
       writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT, false);
       writer.writeAttribute(HtmlAttributes.NAME, "tobago.dummy", false);
@@ -554,7 +553,7 @@ public class PageRenderer extends PageRe
 
     writer.startElement(HtmlElements.IMG, null);
     writer.writeClassAttribute(Classes.create(page, "overlayErrorPreloadedImage"));
-    final String error = ClientProperties.getInstance(facesContext).getUserAgent().isMsie6()
+    final String error = clientProperties.getUserAgent().isMsie6()
         ? ResourceManagerUtils.getImageWithPath(facesContext, "image/remove.gif") // XXX why png doesn't work in ie6?
         : ResourceManagerUtils.getImageWithPath(facesContext, "image/dialog-error.png");
     writer.writeAttribute(HtmlAttributes.SRC, error, false);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java Tue Apr  1 09:05:59 2014
@@ -23,6 +23,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.UILabel;
 import org.apache.myfaces.tobago.component.UISeparator;
 import org.apache.myfaces.tobago.config.Configurable;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.layout.Measure;
@@ -34,7 +35,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -51,7 +51,7 @@ public class SeparatorRenderer extends L
     String label = getLabel(separator);
 
     if (label != null) {
-      if (VariableResolverUtils.resolveClientProperties(facesContext).getUserAgent().isMsie()) {
+      if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
         label = StringUtils.replace(label, " ", HtmlUtils.CHAR_NON_BEAKING_SPACE);
       }
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuNodeRenderer.java?rev=1583579&r1=1583578&r2=1583579&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuNodeRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuNodeRenderer.java Tue Apr  1 09:05:59 2014
@@ -20,6 +20,7 @@
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
 import org.apache.myfaces.tobago.component.UITreeNode;
+import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.context.UserAgent;
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
@@ -32,7 +33,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.util.VariableResolverUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -50,8 +50,7 @@ public class TreeMenuNodeRenderer extend
     final boolean dataRendersRowContainer = data.isRendersRowContainer();
     final boolean folder = node.isFolder();
     final String clientId = node.getClientId(facesContext);
-    final boolean ie6
-        = VariableResolverUtils.resolveClientProperties(facesContext).getUserAgent().equals(UserAgent.MSIE_6_0);
+    final boolean ie6 = ClientProperties.getInstance(facesContext).getUserAgent().equals(UserAgent.MSIE_6_0);
     final String parentId = data.getRowParentClientId();
     final boolean visible = data.isRowVisible();