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 Bowen <sy...@yahoo.com> on 2004/11/24 18:12:23 UTC

copyProperties with FormFile or Date

I had a problem a while ago when I copied from a bean
(a Torque object) to another bean (Action Form) that
had a Date field, using copyProperties(). It would
crash, with an "argument type mismatch" error. I
played around with it for quite a while, reading about
how you have to register your Date types for it to
work, etc. But I never got it to work, and since the
objects I was using only had a few fields, I just
copied them by hand from the Torque object to the
Form.

But it's come back to bite me in the butt. Now I have
another Form with a FormFile field and it crashes for
the same reason "argument type mismatch", when calling
copyProperties(). I am not sure if this only happens
when the Form File field loaded from the database has
no data in it (thus not being able to copy properly)
or if it always crashes ...

My question is ... well, why doesn't copyProperties()
take care of this? Or, if it does, what am I doing
wrong? And, if there is no "fix" is there an easier
way to copy SOME and not ALL of the properties of a
Bean? It was no problem with my first bean, it had 3
fields, but this one has over 30!

Many thanks in advance.
syg


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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