java.util.Date getMyFieldAsDate(String format) {
String dateString = this.MyField;
//parse the string to a date and return
}
I don't know if this is 'correct', but it works for me.
-matt
On Monday, June 2, 2003, at 03:49 PM, lcl wrote:
Is there not any other ways?
Because I want to use a single class to act as formbean and value object :-)
However, thank you very much.
"Chen, Gin" <[EMAIL PROTECTED]>
:[EMAIL PROTECTED] ..userUse java.lang.String instead of java.sql.Date in your FormBeans -Tim
-----Original Message----- From: lcl [mailto:[EMAIL PROTECTED] Sent: Sunday, June 01, 2003 11:13 PM To: [EMAIL PROTECTED] Subject: Struts can not accept a date field if it is blank
Hi all ,
In my form, there is a date field which can be null in database. So thecan let it to be blank,but struts can not convert it to form bean, error
message is :
org.apache.commons.beanutils.ConversionException
So , How can deal with it? Any advice will be appreciate.
lcl
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

