incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r488599 - in /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator: DoubleRangeValidator.java LongRangeValidator.java
Date Tue, 19 Dec 2006 09:44:12 GMT
Author: matzew
Date: Tue Dec 19 01:44:11 2006
New Revision: 488599

URL: http://svn.apache.org/viewvc?view=rev&rev=488599
Log:
enhanced long/double range validator to send down customized messages to the client

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java?view=diff&rev=488599&r1=488598&r2=488599
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
Tue Dec 19 01:44:11 2006
@@ -110,6 +110,8 @@
   public double getMaximum()
   {
     Object maxLong = _facesBean.getProperty(_MAXIMUM_KEY);
+    if(maxLong == null)
+      maxLong = Double.MAX_VALUE;
     return ComponentUtils.resolveDouble(maxLong);
   }
 
@@ -134,6 +136,8 @@
   public double getMinimum()
   {
     Object minLong = _facesBean.getProperty(_MINIMUM_KEY);
+    if(minLong == null)
+      minLong = Double.MIN_VALUE;
     return ComponentUtils.resolveDouble(minLong);
   }
 
@@ -406,10 +410,10 @@
   private static final FacesBean.Type _TYPE = new FacesBean.Type();
 
   private static final PropertyKey _MINIMUM_KEY =
-    _TYPE.registerKey("minimum", Double.class, Double.MIN_VALUE);
+    _TYPE.registerKey("minimum", Double.class);
 
   private static final PropertyKey _MAXIMUM_KEY =
-    _TYPE.registerKey("maximum", Double.class, Double.MAX_VALUE );
+    _TYPE.registerKey("maximum", Double.class);
 
   private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
     _TYPE.registerKey("messageDetailMaximum", String.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java?view=diff&rev=488599&r1=488598&r2=488599
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java
Tue Dec 19 01:44:11 2006
@@ -112,6 +112,8 @@
   public long getMaximum()
   {
     Object maxLong = _facesBean.getProperty(_MAXIMUM_KEY);
+    if(maxLong == null)
+      maxLong = Long.MAX_VALUE;
     return ComponentUtils.resolveLong(maxLong);
   }
 
@@ -136,6 +138,8 @@
   public long getMinimum()
   {
     Object minLong = _facesBean.getProperty(_MINIMUM_KEY);
+    if(minLong == null)
+      minLong = Long.MIN_VALUE;
     return ComponentUtils.resolveLong(minLong);
   }
 
@@ -408,10 +412,10 @@
   private static final FacesBean.Type _TYPE = new FacesBean.Type();
 
   private static final PropertyKey _MINIMUM_KEY =
-    _TYPE.registerKey("minimum", Long.class, Long.MIN_VALUE);
+    _TYPE.registerKey("minimum", Long.class);
 
   private static final PropertyKey _MAXIMUM_KEY =
-    _TYPE.registerKey("maximum", Long.class, Long.MAX_VALUE );
+    _TYPE.registerKey("maximum", Long.class);
 
   private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
     _TYPE.registerKey("messageDetailMaximum", String.class);



Mime
View raw message