Grokbase Groups Turbine dev June 2003
FAQ

[Turbine-dev] cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/intake/model BigDecimalField.java DoubleField.java FloatField.java StringField.java StringKeyField.java

Colin Chalmers
Jun 19, 2003 at 4:05 pm
Yup youre right should be StringField

colin

----- Original Message -----
From: "Quinton McCombs" <qmccombs@nequalsone.com>
To: "'Turbine Developers List'" <turbine-dev@jakarta.apache.org>
Sent: Thursday, June 19, 2003 6:01 PM
Subject: RE: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/model
BigDecimalField.java DoubleField.java FloatField.java StringField.java
StringKeyField.java

-----Original Message-----
From: henning@apache.org
Sent: Thursday, June 19, 2003 9:57 AM
To: jakarta-turbine-2-cvs@apache.org
Subject: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/
model BigDecimalField.java DoubleField.java FloatField.java
StringField.java StringKeyField.java


henning 2003/06/19 07:56:30

Modified: src/java/org/apache/turbine/services/intake/model
BigDecimalField.java DoubleField.java
FloatField.java StringField.java
StringKeyField.java
Log:
Adding the new validator classes to the various fields in the model.

Patch donated by Colin Chalmers <colin.chalmers@maxware.nl> [snip]
Index: StringKeyField.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/servic
es/intake/model/StringKeyField.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- StringKeyField.java 7 Apr 2003 15:37:55 -0000 1.9
+++ StringKeyField.java 19 Jun 2003 14:56:30 -0000 1.10
@@ -59,6 +59,7 @@
import org.apache.torque.om.StringKey;

import org.apache.turbine.services.intake.IntakeException;
+import
org.apache.turbine.services.intake.validator.StringValidator;
import org.apache.turbine.services.intake.xmlmodel.XmlField;

/**
@@ -66,6 +67,7 @@
* @author <a href="mailto:hps@intermeta.de">Henning P.
Schmiedehausen</a>
* @author <a href="mailto:quintonm@bellsouth.net">Quinton
McCombs</a>
* @version $Id$
+ * @deprecated Use String instead
Don't you mean 'Use StringField instead' ?

*/
public class StringKeyField
extends Field
@@ -85,6 +87,16 @@
}

/**
+ * Produces the fully qualified class name of the
default validator.
+ *
+ * @return class name of the default validator
+ */
+ protected String getDefaultValidator()
+ {
+ return StringValidator.class.getName();
+ }
+
+ /**
* Sets the default value for a String field
*
* @param prop Parameter for the default values
@@ -110,14 +122,16 @@
StringKey[] ival = new StringKey[ss.length];
for (int i = 0; i < ss.length; i++)
{
- ival[i] = (StringUtils.isNotEmpty(ss[i]))
? new StringKey(ss[i]) : null;
+ ival[i] = (StringUtils.isNotEmpty(ss[i]))
+ ? new StringKey(ss[i]) : null;
}
setTestValue(ival);
}
else
{
String val = parser.getString(getKey());
- setTestValue((StringUtils.isNotEmpty(val)) ?
new StringKey(val) : null);
+ setTestValue((StringUtils.isNotEmpty(val))
+ ? new StringKey(val) : null);
}
}
}




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
reply

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›