Code Comments
Programming Forum and web based access to our favorite programming groups.I would like to copy a bean in an another bean with the same properties name
but some different type, using BeanUtils.copyProperties. ( in the common
package "org.apache.commons.beanutils")
I thought that conversions was possible but i am not able to make them
work!
For example ...where is the mistake?
class BeanString {
String age;
...public void set...
...public String get..
}
class BeanInteger {
Integer age;
...public void set
...public Integer get..
}
then i do
BeanInteger intBean = new...
BeanString stringBean = new...
PropertyUtils.copyProperties(intBean, stringBean);
and i get a NoSuchMethodException.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.