Thank you Dan, your suggestions are inviting...In which cases can you use BeanUtils.copyProperties? Sorry for that question, I hadn't time to go trough the documentation, so If you can give me some insights, otherwise I'll wait until I'll have some more time and will investigate on the BeanUtils.copyProperties method.
Regards, Marco > -----Original Message----- > From: Dan Allen [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 22, 2003 4:03 PM > To: Struts Users Mailing List > Subject: Re: Retrieving properties from a DynaValidatorForm > > > > The alternative is to use the request.getParameter("..") > method, which > > is what I'm doing at present. > > You definitly don't want to be doing this. First cast your > form to a DynaValidatorForm and then case each property as > appropriate: > > String name = (String) form.get("name"); > > ...however, > > I have found that sometimes I do a lot of work to convert. > So I write a base form class that extends DynaValidatorForm > with methods such as > > getAsDouble > getAsString > getAsInteger > getAsFloat > getAsBoolean > > and so an and so forth. Those methods just use ConvertUtils > to convert from String to whatever I need. But that is just > one solution. In most cases you don't even need this if you > are using BeanUtils.copyProperties > > Dan > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Daniel Allen, <[EMAIL PROTECTED]> > http://www.mojavelinux.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Real programmers just hate to get up in the morning, and > contrary to Ordinary People, they're in better shape as > it gets closer to nighttime. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]