Rivka Shisman wrote:
Thanks Joe
When you say -
this is a limitation of the BeanUtils design
model. It assumes for any given process (instance of BeanUtils), a
single conversion strategy applies to all objects of a given type.
Do you mean that the converter applies thru my all application?
As much as I know - copyProperties() is a static method of BeanUtils so
I'm don't really know where (if at all) BeanUtils is instanciated.
Thanks
Rivka
You can register specific converters per call to copyProperties() to get
the one you need in a particular situation. Here's what I do:
BeanUtilsBean util = new BeanUtilsBean();
ConvertUtilsBean converter = util.getConvertUtils();
converter.register(myConverter, SomeType.class);
util.copyProperties(bo, vo);
That way, you can register an instance of Converter that knows what
format string to use each time you call copyProperties().
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]