Jeff Beal wrote:
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.
True, I use it for the same purpose, but my expectations about the forms
and validations were much higher ... obviously this is a limitation and
that's it (for now)
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.
Is this with JSP by specification or it's a implementation issue? I hope
it's by spec ...
Cheers
Borislav
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]