You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <ma...@reumann.net> on 2002/10/11 22:31:44 UTC

Re[4]: Struts forms best practice

On Friday, October 11, 2002, 2:58:44 PM, Craig wrote:

CRM> Without knowing what "crap out on me" means, it's impossible to diagnose
CRM> this.  Are you getting an exception so you can look at a stack trace?

     I didn't know BeanUtils.copyProperties() should be able to take a
     String date and can convert it into a java.util.Date. For some
     reason when I try using BeanUtils.copyProperties() and I have a
     java.util.Date that needs to be populated from a String, I get a

     java.lang.IllegalArgumentException: argument type mismatch

     error. The String version of the date is in MMddyyyy format in
     the form bean. I noticed when looking at ConvertUtils that it
     doesn't seem to mention that java.util.Date is provided by
     default (looks like only java.sql.Date is). Maybe that's the
     cause of the argument type mismatch (since I'm using
     java.util.Date)? Thanks for the heads up into looking at
     ConvertUtils.register(). Maybe that will help if I read more on
     how to register my own conversion.

     Thanks for the help so far.


-- 

Rick
mailto:maillist@reumann.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>