myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r543552 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Date Fri, 01 Jun 2007 17:46:57 GMT
Author: bommel
Date: Fri Jun  1 10:46:56 2007
New Revision: 543552

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

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.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=543552&r1=543551&r2=543552
==============================================================================
--- 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
Fri Jun  1 10:46:56 2007
@@ -988,7 +988,9 @@
    */
   @Deprecated
   public static void setConverter(UIComponent component, String converterId) {
-    setConverter((ValueHolder) component, converterId);
+    if (component instanceof ValueHolder) {
+      setConverter((ValueHolder) component, converterId);
+    }
   }
 
   public static void setConverter(ValueHolder valueHolder, String converterId) {
@@ -1015,7 +1017,9 @@
    */
   @Deprecated
   public static void setAction(UIComponent component, String type, String action) {
-    setAction((UICommand) component, type, action);
+    if (component instanceof UICommand) {
+      setAction((UICommand) component, type, action);
+    }
   }
   
   public static void setAction(UICommand component, String type, String action) {
@@ -1023,7 +1027,7 @@
     final FacesContext facesContext = FacesContext.getCurrentInstance();
     final Application application = facesContext.getApplication();
     if (type != null && UIComponentTag.isValueReference(type)) {
-         commandType = (String) application.createValueBinding(type).getValue(facesContext);
+      commandType = (String) application.createValueBinding(type).getValue(facesContext);
     } else {
       commandType = type;
     }
@@ -1058,7 +1062,9 @@
    */
   @Deprecated
   public static void setSuggestMethodBinding(UIComponent component, String suggestMethod)
{
-    setSuggestMethodBinding((UIInput) component, suggestMethod);
+    if (component instanceof UIInput) {
+      setSuggestMethodBinding((UIInput) component, suggestMethod);
+    }
   }
   public static void setSuggestMethodBinding(UIInput component, String suggestMethod) {
     if (suggestMethod != null) {



Mime
View raw message