Gabriel,

I'm not sure how Beanutils handles java.util.Date, but I have had this problem when trying to convert to java.sql.Date when the source value (in my form) was null. Now I call a method like this before a call to copyProperties():


public static void overrideConverters() {
// override the default values for Date and Timestamp converters,
// so we don't get conversion exceptions when one of these fields
// has a null value
ConvertUtils.register(new SqlDateConverter(null), Date.class);
ConvertUtils.register(new SqlTimestampConverter(null), Timestamp.class);
}


I don't know if this is the "right way" to handle this, but works for me so far.

Hope this helps,
Colin

Gabriel França Campolina wrote:

Hi folks,

I'd like know how copy fields that not String, of my DynaForm to my
bean, I'm use the commos beanutils, but when this read one field the
type java.util.Date one exception is created...How i do?

Thanks,




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to