Re: Using Dates in a ActionForm

2005-11-18 Thread Michael Jouravlev
On 11/16/05, Jesus Salvo Jr. <[EMAIL PROTECTED]> wrote: > > Thanks ... I sort of worked around it by using java.sql.Date instead, > since the built-in converts in commons-beanutils does not really have a > java.util.Date converter, > only a java.sql.Date converter. > > However, I still have one pr

Re: Using Dates in a ActionForm

2005-11-18 Thread Zoran Avtarovski
I'm not sure if this is what you're looking for, but I just have a setStrDate(String strDate) method and do the conversion yourself. Set your form property to strDate. First test for nullness (if such a thing exists) and set the date to something your validation rules will pickup. Z. > > Thanks

Re: Using Dates in a ActionForm

2005-11-17 Thread Laurie Harper
The problem is the use of a Date type for the form property. The first thing Struts does is populate the form bean from the request; this has to happen before validation, so the validation has a form to work with. This is one of the many reasons it's recommended to make your form bean properti

Re: Using Dates in a ActionForm

2005-11-16 Thread Yujun Liang
The exception happens before validation. I aksed the same question before and I didn't get a clean solution yet, so far, if you define it as a java.sql.Timestamp, you have to provide an input in -mm-dd hh:mm:ss.f format Did you try beanDef? Or maybe you can change the default Request

Re: Using Dates in a ActionForm

2005-11-16 Thread Yujun Liang
The exception happens before validation. I aksed the same question before and I didn't get a clean solution yet, so far, if you define it as a java.sql.Timestamp, you have to provide an input in -mm-dd hh:mm:ss.f format Did you try beanDef? Maybe you can change the default RequestProc

Re: Using Dates in a ActionForm

2005-11-16 Thread Jesus Salvo Jr.
Thanks ... I sort of worked around it by using java.sql.Date instead, since the built-in converts in commons-beanutils does not really have a java.util.Date converter, only a java.sql.Date converter. However, I still have one problem with this. If a user leave the date field empty in the form

Re: Using Dates in a ActionForm

2005-11-16 Thread Yujun Liang
Here is some replies when I asked the same question before, hope it helps. Regards - Original Message - From: "JEROME RAULINE" <[EMAIL PROTECTED]> To: "Yujun Liang" <[EMAIL PROTECTED]> Sent: Friday, October 28, 2005 6:53 PM Subject: java.util.Date in Action Form Bean > Hi, > > You'd bett