Re: [Strutsgenerator-user] argument type mismatch
Brought to you by:
javanovic
From: Bernardinus <bbe...@gm...> - 2003-04-23 05:12:23
|
----- Original Message ----- From: "Juan Pablo Morales" <ju_...@ho...> To: <str...@li...> Sent: Saturday, April 19, 2003 1:44 AM Subject: Re: [Strutsgenerator-user] argument type mismatch > It is indeed the latest build, taken from CVS. Looking into it, I think > I found what could be a fix: > In DAO.java, line 44 it reads > BeanUtils.populate(bean, properties); > However, that method is intended for use with web request parameters, > and cannot distinguish between a date and a String (it can, however tell > a number form a String, and that's why it works with numbers and not > dates) it could be changed for > PropertyUtils.copyProperties(bean, properties); > > Does anybody see hidden side effects that would make this solution > undesirable? > Have you checked the latest cvs version? As far as I can tell DAO is now implemented using BeanUtils.copyProperties(). The latest also seems to cater for date formating as well. See: http://cvs.strutsgenerator.sourceforge.net/cgi-bin/viewcvs.cgi/strutsgenerat or/StrutsGenerator/bin/template/dao/dao-abstract.vm.diff?r1=1.2&r2=1.3 I have reservation of using PropertyUtils.copyProperties() as it does not do type converstion. Hope that helps :) cheers, /bernard |