You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2010/04/06 15:24:40 UTC
svn commit: r931144 -
/click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java
Author: sabob
Date: Tue Apr 6 13:24:40 2010
New Revision: 931144
URL: http://svn.apache.org/viewvc?rev=931144&view=rev
Log:
throw UnsupportedOperationException if setMaxLength or setMinLength is called
Modified:
click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java
Modified: click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java?rev=931144&r1=931143&r2=931144&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java Tue Apr 6 13:24:40 2010
@@ -229,6 +229,20 @@ public class NumberField extends TextFie
// Public Attributes ------------------------------------------------------
/**
+ * Operation not supported by NumberField, use {@link #setMaxValue(double)}
+ * instead.
+ *
+ * @param maxLength the maximum field length validation constraint
+ * @throws UnsupportedOperationException use {@link #setMaxValue(double)}
+ * instead
+ */
+ @Override
+ public void setMaxLength(int value) {
+ throw new UnsupportedOperationException("NumberField does not support"
+ + " maxLength(int), use setMaxValue(double) instead.");
+ }
+
+ /**
* Return the maximum valid double field value.
*
* @return the maximum valid double field value
@@ -247,6 +261,20 @@ public class NumberField extends TextFie
}
/**
+ * Operation not supported by NumberField, use {@link #setMinValue(double)}
+ * instead.
+ *
+ * @param minLength the minimum field length validation constraint
+ * @throws UnsupportedOperationException use {@link #setMinValue(double)}
+ * instead
+ */
+ @Override
+ public void setMinLength(int value) {
+ throw new UnsupportedOperationException("NumberField does not support"
+ + " minLength(int), use setMinValue(double) instead.");
+ }
+
+ /**
* Set the minimum valid double field value.
*
* @param value the minimum valid double field value