RE: DateUtilities for ActionForms?

2003-06-03 Thread Mark Galbreath
: DateUtilities for ActionForms? What are you talking about? I assume you mean the java.util.Date class. This class is anything but deprecated, it is the de facto method of storing a date in Java. The reason it has a lot of deprecated methods and constructors is that in 1.2 the class

RE: DateUtilities for ActionForms?

2003-06-03 Thread Andrew Hill
nasty way!) for nanoseconds... -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, 2 June 2003 22:06 To: 'Struts Users Mailing List' Subject: RE: DateUtilities for ActionForms? java.sql.Date is a subclass of java.util.Date (as is java.sql.TimeStamp) and as far

RE: DateUtilities for ActionForms?

2003-06-03 Thread Mark Galbreath
Mailing List' Subject: RE: DateUtilities for ActionForms? java.sql.Date is a subclass of java.util.Date (as is java.sql.TimeStamp) and as far as I can see, is the only reason for the latter's existence. As David Flannigan points out in Java In A Nutshell, 4th Ed (O'Reilly 2002), p. 654: Since Java

Re: DateUtilities for ActionForms?

2003-06-03 Thread Gareth Andrew
java.util.Date exists simply to *store* dates, the calendar class and the dateFormat class exist to *manipulate* dates. java.sql.Date exists because SQL has different conventions for storing a date than the JVM. The Java API docs for java.util.Date explain the deprecated methods. Prior to JDK

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
[EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Fri, 30 May 2003 09:18:18 -0400 I wrote a simple conversion method and pass the Strings through - no hassle at all. Given

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
: Mark Galbreath [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Fri, 30 May 2003 09:18:18 -0400 I wrote a simple conversion method and pass the Strings through - no hassle

Re: DateUtilities for ActionForms?

2003-06-01 Thread Ted Husted
Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Fri, 30 May 2003 09:18:18 -0400 I wrote a simple conversion method and pass the Strings through - no hassle at all. Given the String Jan 1, 2003: Calendar date = getDate

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
are kicking my butt. --- Thanks... Mick Knutson --- From: Mark Galbreath [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Sat, 31 May 2003 11:32:53 -0400 java.util.Calendar

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
Nice utils, Ted! Thanks for sharing. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 12:07 PM To: Struts Users Mailing List Subject: Re: DateUtilities for ActionForms? I started a helper class here: http://cvs.sourceforge.net/cgi-bin

Re: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
Thanks for sharing. I am working on this right now... --- Thanks... Mick Knutson --- From: Ted Husted [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: DateUtilities for ActionForms? Date: Sat, 31 May 2003 12

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
Post the relevant code and let's see what we can do... Mark -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 12:12 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Then why are the months hard-coded? I am really just

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
Here is my JSP: tr tdbean:message key=alert.endingDate//td tdhtml:text property=endingDate size=32 maxlength=32 //td /tr My DynaForm declaration: -=== form-bean name=alertForm dynamic=true

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
try changing form-property name=endingDate type=java.util.Date / to form-property name=endingDate type=java.sql.Date / Mark -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 12:35 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities

Re: DateUtilities for ActionForms?

2003-06-01 Thread Gareth Andrew
. HTH. Gareth. Mick Knutson wrote: Is there already a set of DateUtilities for ActionForms? I am finding myself converting to and from Strings and also reformating my Dates to and from my DB. I am using EntityBeans and ValueObjects with my ActionForms, so to keep the types in synch, it seems I

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
: Mark Galbreath [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Sat, 31 May 2003 13:07:43 -0400 try changing form-property name=endingDate type=java.util.Date / to form

Re: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
[EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: DateUtilities for ActionForms? Date: Sat, 31 May 2003 18:23:27 +0100 Mick, Have you tried using the BeanUtils converters. From the docs: *org.apache.commons.beanutils.locale.converters.DateLocaleConverter * Standard

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
Yes, you would have to change all references in any class. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:25 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? I will try that, but would I also have to change my

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Sat, 31 May 2003 13:34:05 -0400 Yes, you would have to change all references in any class. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:25 PM

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
: Saturday, May 31, 2003 1:41 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? I just tried again, and get the BeanUtils.populate error. No other stacktrace. I really hate that. It tells me nothing about the actual error, and it seems to be somewhere in the Controller I think

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
: DateUtilities for ActionForms? Date: Sat, 31 May 2003 13:46:53 -0400 I'd advise that, since you are under a deadline here, that you change the type from Date to String and do the conversions in your Action class. At least until we can figure out what is wrong. And I would use Calendar, not Date

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
I feel your pain, dude. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:52 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? I guess that is what I will have to do and re-visit this later. I _do_ thank you for your help

Re: DateUtilities for ActionForms?

2003-06-01 Thread Gareth Andrew
PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: DateUtilities for ActionForms? Date: Sat, 31 May 2003 18:23:27 +0100 Mick, Have you tried using the BeanUtils converters. From the docs

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
for ActionForms? Date: Sat, 31 May 2003 13:56:21 -0400 I feel your pain, dude. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:52 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? I guess that is what I will have to do and re

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
Drink more microbrew. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 2:00 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Thanks. I can't wait till the pain is over and the euphoric numbing takes over

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mark Galbreath
Why are you guys continuing to advocate the use of a deprecated class? Look at the API! Mark -Original Message- From: Gareth Andrew [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:59 PM To: Struts Users Mailing List Subject: Re: DateUtilities for ActionForms? If you want

RE: DateUtilities for ActionForms?

2003-06-01 Thread Mick Knutson
Mailing List' [EMAIL PROTECTED] Subject: RE: DateUtilities for ActionForms? Date: Sat, 31 May 2003 14:01:45 -0400 Drink more microbrew. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 2:00 PM To: [EMAIL PROTECTED] Subject: RE: DateUtilities

Re: DateUtilities for ActionForms?

2003-06-01 Thread Gareth Andrew
Message- From: Gareth Andrew [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:59 PM To: Struts Users Mailing List Subject: Re: DateUtilities for ActionForms? If you want to use Locale aware conversions perhaps you should be using LocaleBeanUtils rather than BeanUtils. You should

RE: DateUtilities for ActionForms?

2003-05-31 Thread Mark Galbreath
JDK 1.4. Mark -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: DateUtilities for ActionForms? Is there already a set of DateUtilities for ActionForms? I am finding myself converting to and from Strings

DateUtilities for ActionForms?

2003-05-30 Thread Mick Knutson
Is there already a set of DateUtilities for ActionForms? I am finding myself converting to and from Strings and also reformating my Dates to and from my DB. I am using EntityBeans and ValueObjects with my ActionForms, so to keep the types in synch, it seems I have to do serious conversion all