incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r468584 - /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java
Date Fri, 27 Oct 2006 23:24:48 GMT
Author: matzew
Date: Fri Oct 27 16:24:48 2006
New Revision: 468584

URL: http://svn.apache.org/viewvc?view=rev&rev=468584
Log:
added double/float support 

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java?view=diff&rev=468584&r1=468583&r2=468584
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java
Fri Oct 27 16:24:48 2006
@@ -236,9 +236,6 @@
     }
   }
 
-
-
-
   /**
    * Set a property of type java.lang.Long.  If the value
    * is an EL expression, it will be stored as a ValueBinding.
@@ -260,6 +257,54 @@
     else
     {
       bean.setProperty(key, Long.valueOf(value));
+    }
+  }
+
+  /**
+   * Set a property of type java.lang.Dobule.  If the value
+   * is an EL expression, it will be stored as a ValueBinding.
+   * Otherwise, it will parsed with Dobule.valueOf().
+   * Null values are ignored.
+   */
+  protected void setDoubleProperty(
+    FacesBean   bean,
+    PropertyKey key,
+    String      value)
+  {
+    if (value == null)
+      return;
+
+    if (isValueReference(value))
+    {
+      bean.setValueBinding(key, createValueBinding(value));
+    }
+    else
+    {
+      bean.setProperty(key, Double.valueOf(value));
+    }
+  }
+
+  /**
+   * Set a property of type java.lang.Float.  If the value
+   * is an EL expression, it will be stored as a ValueBinding.
+   * Otherwise, it will parsed with Dobule.valueOf().
+   * Null values are ignored.
+   */
+  protected void setFloatProperty(
+    FacesBean   bean,
+    PropertyKey key,
+    String      value)
+  {
+    if (value == null)
+      return;
+
+    if (isValueReference(value))
+    {
+      bean.setValueBinding(key, createValueBinding(value));
+    }
+    else
+    {
+      bean.setProperty(key, Float.valueOf(value));
     }
   }
 



Mime
View raw message