You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pl...@apache.org on 2007/05/01 17:33:34 UTC

svn commit: r534125 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java

Author: pleff
Date: Tue May  1 08:33:33 2007
New Revision: 534125

URL: http://svn.apache.org/viewvc?view=rev&rev=534125
Log:
Added hasValue method.

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java?view=diff&rev=534125&r1=534124&r2=534125
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java Tue May  1 08:33:33 2007
@@ -66,6 +66,16 @@
     }
   }
 
+  public static boolean hasValue(FacesContext facesContext, UIComponent component,
+      String name) {
+    try {
+      getValue(facesContext, component, name);
+      return true;
+    } catch (NullPointerException e) {
+      return false;
+    }
+  }
+
   private static Integer createValue(FacesContext facesContext,
       UIComponent component, String name) {
     String family;
@@ -126,7 +136,7 @@
 
 
   private static class CacheKey {
-    private String  clientProperties;
+    private String clientProperties;
     private Locale locale;
     private String rendererType;
     private String name;