struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: Struts 1.x Best Practices...
Date Thu, 05 Jul 2007 18:15:42 GMT
The beanUtils.copyProperties method handles simple conversions. For
complex conversions, like dates, I often found it simplest to code an
extra property, so that there would be both  "currentDateText"  and
"currentDate" properties. The business layer would use the currentDate
property and the actionForm would handle the type conversions through
currentDateText on the fly and call getCurrentDate or setCurrentDate
behind the scenes.

I've a list of Struts Practices in the form of a presentation here:


but there isn't much explanation.

HTH, Ted.

On 6/29/07, Viplav Kallepu <> wrote:
> Hi,
>        I am new to struts. I am using struts 1.3.8 for my project. Where can
> I found the appropriate best practices to maintain while devlopment. I found
> lot of material while browsing but wasn't able to figure out which was the
> good one.
>       My doubt is I am using a bean for every oracle table. Now the dataType
> of variables set in the bean are same as the datatype as in the oracle
> table. My form uses all the strings as recommended. What is the best place
> to make dataType conversions that is what making me confused. As I have to
> use the same beanClass for updating values in oracle and also to set values
> for form, I cant put dataType conversion code in setter methods of the
> Class. If I put dataType Conversions in ActionClass.. its becoming messy,
> (which I feel is intended for business logic ).. I wish to use the  best MVC
> architecture suggested by struts team.. So can anyone please help me
> figuring out this issue. Thanks in advance.
> --
> Thanks
> Viplav

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

View raw message