Thank you very much Charles! I will try to do it with that. If anyone feels great today and feels like adding some sample code it would make my day complete! ;-)
Regards, Ronald ----- Original Message ----- From: "Charles McClain" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 10:06 PM Subject: RE: Where do you convert (form) strings to other data types? > Ronald: > > I was too lazy before to look up Ted Husted's Struts Tip that I referred > to in my previous reply; it's actually in his "Struts Catalog" of Struts > design patterns on his webpage, http://husted.com/struts/catalog.html . > The title of the particular design pattern in that document is 'Use a > "populate" utility to exchange data with value objects'. Do a search on > that string and you'll find it. > > Regards, > > > -----Original Message----- > From: Ronald Rotteveel [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 01, 2002 11:18 AM > To: Struts Users Mailing List > Subject: Re: Where do you convert (form) strings to other data types? > > > Thanks Charles, > > I even got a book ("Professional JSP Site Design") where Ted Husted is a > co-author. I also found two lines of code on his website > (www.husted.com), but I still can't find out how this will do in my > example with the select input field. Should I convert it in de Action > class then? > > Hope to hear from anyone (I would like them most with some code examples > if that's possible...) > > Thank you all! > > Regards, > > Ronald Rotteveel > > ----- Original Message ----- > From: "Charles McClain" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Tuesday, October 01, 2002 4:29 PM > Subject: RE: Where do you convert (form) strings to other data types? > > > > Ronald: > > > > In one of his Struts Tips on Jguru (sorry, I can't remember which one > > exactly), Ted Husted recommends creating a ValueUtils class for such > > supporting methods, both to separate them from the model and to > > support re-use -- since such methods are likely to be needed in more > > than one data transfer/conversion. > > > > -----Original Message----- > > From: Ronald Rotteveel [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, October 01, 2002 7:04 AM > > To: Struts Users Mailing List > > Subject: Where do you convert (form) strings to other data types? > > > > > > Dear all, > > > > I'm building a web application with the help of struts 1.0.2 (stable > > release). > > > > In this webapp there are several forms with a date input field. I like > > > to make these input fields available in the following form: > > > > <select name="day"> > > <option value="1">1</option> > > <option value="2">2</option> > > <option value="3">3</option> > > etc. > > </select> > > > > <select name="month"> > > <option value="1">January</option> > > <option value="2">February</option> > > <option value="3">March</option> > > etc. > > </select> > > > > <select name="year"> > > <option value="2002">2002</option> > > <option value="2003">2003</option> > > <option value="2004">2004</option> > > etc. > > </select> > > > > Now my problem is that date values are all stored in the database in > > the timestamp format. How and where do I convert the values of the > > fields above into the right timestamp value. Secondly I also would > > like to know how I can set the above form input field in nice Struts > > tags. > > > > I know these questions are pretty basic, but I'm a rookie at Struts > > and I've got two nice books where the are implementing Struts both at > > a bit different way, so I hope you all could help me out here! > > > > Thanks in advance! > > > > > > Regards, > > > > Ronald Rotteveel > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>