incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r470462 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal: context/RequestContextImpl.java renderkit/core/CoreRenderingContext.java
Date Thu, 02 Nov 2006 18:24:53 GMT
Author: awiner
Date: Thu Nov  2 10:24:52 2006
New Revision: 470462

URL: http://svn.apache.org/viewvc?view=rev&rev=470462
Log:
ADFFACES-276:  Skin family defaulting should be in the renderkit, not the RequestContext

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?view=diff&rev=470462&r1=470461&r2=470462
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
Thu Nov  2 10:24:52 2006
@@ -223,15 +223,10 @@
     return (String) _bean.getProperty(RequestContextBean.OUTPUT_MODE_KEY);
   }
 
-  // get skinFamily; default to minimal if nothing is specified.
   @Override
   public String getSkinFamily()
   {
-    String skinFamily =
-      (String) _bean.getProperty(RequestContextBean.SKIN_FAMILY_KEY);
-    if (skinFamily == null)
-      skinFamily = "minimal";
-    return skinFamily;
+    return (String) _bean.getProperty(RequestContextBean.SKIN_FAMILY_KEY);
   }
 
   @Override

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java?view=diff&rev=470462&r1=470461&r2=470462
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
Thu Nov  2 10:24:52 2006
@@ -344,6 +344,15 @@
   }
 
   /**
+   * Return the default skin family, which is "minimal" for the
+   * core renderkit.
+   */
+  protected String getDefaultSkinFamily()
+  {
+    return "minimal";
+  }
+
+  /**
    * Set the local variable _skin to be the Skin from the
    * SkinFactory that best matches
    * the <skin-family> and current render-kit-id.
@@ -353,6 +362,8 @@
   private void _initializeSkin(RequestContext afContext)
   {
     String skinFamily = afContext.getSkinFamily();
+    if (skinFamily == null)
+      skinFamily = getDefaultSkinFamily();
     String renderKitId = "org.apache.myfaces.trinidad.desktop";
 
     // =-=jmw @todo when we have proper renderKitId switching, I can



Mime
View raw message