You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Robert Lamping <ro...@logicacmg.com> on 2003/11/10 23:17:39 UTC

Beanutils: Convertor for complex types

Dear All,

I would like to use BeanUtils.copyProperties() between my Javabean with only
String properties and my javabean at the "Model" side, with all kind of
property types.

I experimented with the my own version of a LocalizedDate class, following
the example at www.netspread.com.

I tried to create a convertor to convert form a String property to such a
LocalizedDate property.

This LocalizedDate can be configured with a SimpleDateFormat. This can be
done for each instance separately.

For this conversion I thought to create my own convertor as is described in
ConvertUtils.

However the convert method doesn't give me access to the target bean, c.q.
target property, so that I can't retrieve its format. 
Do I see this right or is there a way to get retrieve this information?

A working alternative but less functionality is to fixate the dateformat to
an application wide format and use this format in the convertor. 

Kind regards,

Robert Lamping




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org