----- Original Message -----
From: "Paul Devine" <[EMAIL PROTECTED]>
Subject: Re: Forms and Dates


> There is a separate Jakarta project called 'Taglibs' which may be of
> interest for what you are facing.  Taglibs is a set of reusable tags.
There
> is a DateTime tag library which looks like it would take away most of the
> pain in Date conversion.

Great. That should let me display dates in the right format with no pain.

> Your form classes could then be written to deal
> with Date objects and the date tags take care of the conversion.

I'm afraid this is not completely possible. I can a have a getter which
returns a Date and have the datetime tag take care of the conversion to
string; but when I select a date in a select field of the html form, what
comes back it's always a string: Struts searches for a setter which takes a
string and I get a TypeMismatch.
I think form classes must deal with strings, as Yee said.
This still forces me to convert them back to a Date when I need them in my
business logic; and in this case taglibs do not help.
Anyway, I hope I'm wrong...

> I believe
> Taglibs is connected to a JSR asking for a standard jsp tag library, so
> there's a good chance the tags will be supported and stay around.
> Hope it is of some help

Sure it is. Thanks Paul.



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

Reply via email to