[jboss-cvs] jboss-seam/src/ui/org/jboss/seam/ui ...
Peter Muir
peter at bleepbleep.org.uk
Tue Apr 3 13:45:32 EDT 2007
User: pmuir
Date: 07/04/03 13:45:32
Modified: src/ui/org/jboss/seam/ui JSF.java
Log:
Add utility methods
Revision Changes Path
1.7 +22 -2 jboss-seam/src/ui/org/jboss/seam/ui/JSF.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: JSF.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/JSF.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- JSF.java 18 Mar 2007 04:22:28 -0000 1.6
+++ JSF.java 3 Apr 2007 17:45:32 -0000 1.7
@@ -25,8 +25,8 @@
/**
* Constant declarations for JSF tags
*
- * @author Anton Koinov (latest modification by $Author: gavin $)
- * @version $Revision: 1.6 $ $Date: 2007/03/18 04:22:28 $
+ * @author Anton Koinov (latest modification by $Author: pmuir $)
+ * @version $Revision: 1.7 $ $Date: 2007/04/03 17:45:32 $
*/
public class JSF
{
@@ -191,6 +191,26 @@
return value.toString();
}
+ public static Integer getIntegerValue(FacesContext context, ValueBinding vb)
+ {
+ String value = getStringValue(context, vb);
+ if (value == null)
+ {
+ return null;
+ }
+ return new Integer(value);
+ }
+
+ public static Double getDoubleValue(FacesContext context, ValueBinding vb)
+ {
+ String value = getStringValue(context, vb);
+ if (value == null)
+ {
+ return null;
+ }
+ return new Double(value);
+ }
+
public static Boolean getBooleanValue(FacesContext context, ValueBinding vb)
{
Object value = vb.getValue(context);
More information about the jboss-cvs-commits
mailing list