Hi all, happy friday (again... :)

I'm trying to figure out what I am doing wrong with
PropertyUtils.copyProperties().  From within my Action, I have:

        User user = <bean>;
        DynaActionForm regForm = (DynaActionForm) form;
        PropertyUtils.copyProperties(regForm, user);

When I look at what copyProperties is doing, it's getting a
PropertyDescriptor array from getPropertyDescriptors() with the user bean
correctly, then it iteratively tries to see if the regForm has any of the
properties found in the user bean.  But calling
getPropertyDescriptor(regForm, <fieldname>) seems to be comparing the
(correct) field names from the bean against the *structure* of the
DynaActionForm component (i.e. the multipartRequestHandler, dynaClass,
servlet, etc), instead of the DynaFields that I set up in my <form-bean/>.

I don't think nested properties are the answer, and copyProperties() is
supposed to work with DynaBean in the source, destination, both or neither.  

Any ideas?  The code seems to work fine when the source and destination are
reversed.  I'm using 1.1-b2.

Thanks a bunch,

Brian

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

Reply via email to