struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <>
Subject Re: date format problems
Date Thu, 06 Mar 2003 16:32:49 GMT
On Thu, 6 Mar 2003 10:39:08 -0500
"apachep2" <> wrote:

> You are not alone.
> Re the original posting, I have another thought.
> 1. Date can be displayed using format string.
> 2. Date can be saved as long.
> Will that reduce your conversion?

I think he wants to use BeanUtils.copyProperties() though which will do
the conversion for him. The approach you guys (I think) are taking
involves doing the actual conversion up front. If you register a
converter to BeanUtils, you can easily copy all the FormBean fields to a
DataTransferObject (or ValueObject, or whatever you want to call it:) in
one fell swoop:

BeanUtils.copyProperties( beanToCopyTo, beanCopyingFrom );

Normally you don't even need to register a converter, but, unless things
have changed recently, copyProperties() will not work by default on
java.util.Date property.

Rick Reumann

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message