You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nathan Coast <na...@levelseas.com> on 2001/08/09 15:06:09 UTC
java.util.Date properties
Hi,
We've got a number of forms in which it would be useful to have
java.util.Date properties. Is there any plan to have conversions for data
types other than the standard java.lang basic type wrappers?
from Convert Utils
if (clazz == stringClass) {
if (value == null)
return ((String) null);
else
return (value);
} else if (clazz == Integer.TYPE) {
return (convertInteger(value, defaultInteger));
} else if (clazz == Boolean.TYPE) {
return (convertBoolean(value, defaultBoolean));
} else if (clazz == Long.TYPE) {
return (convertLong(value, defaultLong));
} else if (clazz == Double.TYPE) {
return (convertDouble(value, defaultDouble));
....
.....
what about adding
}
else if (clazz = java.util.Date)
{
return DateFormat.parse(value);
}
any thoughts?
Cheers
Nathan
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************