I think that if Mark Galbreath were still around, he'd reply with "Validator sucks" or something similar.
Basically, your statements below are all quite correct. I will add (in response to Point 1 below) that the BeanUtils library is what Struts uses internally to copy values from the request to your ActionForm, and it knows how to convert Strings into other types, like Date. I typically use BeanUtils to populate a (well typed) DTO from my ActionForm once the data in the form has been validated. Just to add a little bit, all of this is because ActionForms (whether DynaForms or not) are populated first, then validated. If you have a form property with a type other than String, there's always a chance that incoming parameters can't be converted from String to that type. If the incoming request were validated prior to populating the ActionForm, we could have typed properties on ActionForms. I believe this is approximately the approach taken by JSF. -- Jeff On 7/8/05, Borislav Sabev <[EMAIL PROTECTED]> wrote: > As soon as I set this > <form-property name="startDate" type="java.lang.String" /> > <form-property name="endDate" type="java.util.String" /> > the validator starts to work correctly. > So here I see at least 2 problems: > 1. I'm forced again to parse the String properties of the form to proper > java.util.Date objects (or whatever other type it has to be) > 2. because of 1. , my date format string now is in 2 places instead > of one place i.e. I have a support problem > > So IMHO this is a "framework" inconsistency since. > Please tell me if I do something wrong or this is one of "known > limitations". > > > Borislav --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]