myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r511602 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: component/ComponentUtil.java taglib/component/MenuTag.java taglib/component/ObjectTag.java taglib/component/SelectBooleanCommandTag.java
Date Sun, 25 Feb 2007 20:46:44 GMT
Author: bommel
Date: Sun Feb 25 12:46:43 2007
New Revision: 511602

URL: http://svn.apache.org/viewvc?view=rev&rev=511602
Log:
minor cleanup

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ObjectTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?view=diff&rev=511602&r1=511601&r2=511602
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Sun Feb 25 12:46:43 2007
@@ -370,17 +370,27 @@
     }
   }
 
+  /**
+   * @deprecated please use the  method {@link #getCharacterAttribute(javax.faces.component.UIComponent,
String)}
+   * @param component
+   * @param name
+   */
+  @Deprecated
   public static Character getCharakterAttribute(UIComponent component, String name) {
-    Object charakter = component.getAttributes().get(name);
-    if (charakter == null) {
+    return getCharacterAttribute(component, name);
+  }
+
+  public static Character getCharacterAttribute(UIComponent component, String name) {
+    Object character = component.getAttributes().get(name);
+    if (character == null) {
       return null;
-    } else if (charakter instanceof Character) {
-      return ((Character) charakter);
-    } else if (charakter instanceof String) {
-      String asString = ((String) charakter);
+    } else if (character instanceof Character) {
+      return ((Character) character);
+    } else if (character instanceof String) {
+      String asString = ((String) character);
       return asString.length() > 0 ? Character.valueOf(asString.charAt(0)) : null;
     } else {
-      LOG.warn("Unknown type '" + charakter.getClass().getName()
+      LOG.warn("Unknown type '" + character.getClass().getName()
           + "' for integer attribute: " + name + " comp: " + component);
       return null;
     }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuTag.java?view=diff&rev=511602&r1=511601&r2=511602
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuTag.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuTag.java
Sun Feb 25 12:46:43 2007
@@ -54,6 +54,7 @@
   public void release() {
     super.release();
     label = null;
+    image = null;
   }
 
   public String getLabel() {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ObjectTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ObjectTag.java?view=diff&rev=511602&r1=511601&r2=511602
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ObjectTag.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ObjectTag.java
Sun Feb 25 12:46:43 2007
@@ -37,6 +37,13 @@
     ComponentUtil.setStringProperty(component, ATTR_TARGET, src);
   }
 
+
+  @Override
+  public void release() {
+    super.release();
+    src = null;
+  }
+
   public String getSrc() {
     return src;
   }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java?view=diff&rev=511602&r1=511601&r2=511602
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java
Sun Feb 25 12:46:43 2007
@@ -37,7 +37,6 @@
 
   private static final Log LOG = LogFactory.getLog(SelectBooleanCommandTag.class);
 
-  //public static final String COMMAND_TYPE = "commandSelectBoolean";
   private String label;
   private String value;
   private String tip;
@@ -51,7 +50,6 @@
     super.setProperties(component);
     component.setRendererType(RENDERER_TYPE_MENUCOMMAND);
     ComponentUtil.setStringProperty(component, ATTR_VALUE, value);
-    //ComponentUtil.setStringProperty(component, ATTR_COMMAND_TYPE, COMMAND_TYPE);
     ComponentUtil.setStringProperty(component, ATTR_LABEL, label);
     ComponentUtil.setStringProperty(component, ATTR_TIP, tip);
   }
@@ -60,6 +58,7 @@
     super.release();
     value = null;
     label = null;
+    tip = null;
   }
 
   public String getValue() {



Mime
View raw message