I am trying to use BeanUtil.copyProperties() as described in 5.6.7 in "Struts in Action" (Husted). I have an Interface UserBO which my ActionForm implements. I also have a standard JavaBean UserBOImpl which implements the Interface. I have a DAO that returns a UserBOImpl. I would like to use BeanUtils.copyProperties() to copy all of the UserBOImpl properties into the ActionForm. So I am trying this code in the execute method of my Action:

UserBO user = dao.getUser(myForm.getId());
UserBO userForm = (UserBO)form;
BeanUtils.copyProperties(userForm,user);

myForm is just the ActionForm cast into the ActionForm I wrote that implements UserBO. This code compiles, but when it runs I get a java.lang.IllegalArgumentException: No origin bean specified. Does anyone know why I am getting this error? Is anyone else doing something like this? Anyone getting this error?



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



Reply via email to