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-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 problem

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

Using Dates in a ActionForm

2005-11-16 Thread Jesus Salvo Jr.
Struts 1.2.7 How do u use a ActionForm formbean with a java.util.Date as a property ? The form bean is defined as follows in struts-config.xml: form-bean name=campaignForm type=com.mig.provisioning.CampaignForm/ .. and the actual bean has the following methods: public void

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 better use a

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

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

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