On Fri, 22 Feb 2002, Mathieu Frenette wrote:

> Date: Fri, 22 Feb 2002 12:52:36 -0500
> From: Mathieu Frenette <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: 'Struts Developers List' <[EMAIL PROTECTED]>
> Cc: 'Paul Speed' <[EMAIL PROTECTED]>,
>      'Martin Cooper' <[EMAIL PROTECTED]>
> Subject: RE: PropertyUtils with added PropertyEditor support
>
> I read your threads and I can say I fully agree.
>
> My only concern is that even if PropertyEditor is too heavy for using it
> solely for type conversion, we still need some kind of converter.  And in my
> opinion that should not be the form bean's business.  In my case, I have
> tens of properties scattered in various bean which have the same type (ie.
> NumberKey) and they all need to be converted the same way.  I could
> encapsulate the conversion code in a helper class or base class and use it
> for all my getter/setters, but that still represents a lot of (unnecessary)
> house-keeping coding.  Whereas, with PropertyEditor, I simply had to
> register the editor once, and MAGIC! everything communicates perfectly.
> Don't you think there should be a cleaner way of achieving type conversion
> within Struts?
>

On my list of "good things that really need to be done" is letting you
plug Converters into the BeanUtils class (in commons-beanutils, and
therefore useful in the HEAD branch of Struts) instead of the mandated use
of ConvertUtils static methods.  As usual, this needs to be done in a way
that is fully backwards compatible with the existing functionality, but it
should be feasible.

> -- Mathieu
>

Craig


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

Reply via email to