On 7/8/05, Borislav Sabev <[EMAIL PROTECTED]> wrote:
> 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 ...

It's not really a JSP issue, but a component issue.  In JavaServer
Faces (or Tapestry), the components themselves maintain the string
version of the submitted value so that it can be redisplayed, and also
know how to do the appropriate conversions.  Thus, in a JSF app, the
data you bind to can be of appropriate native types.

Struts 1.x does not have a user interface component model, so the app
has to do all this work itself.

Craig



> 
> Cheers
> Borislav
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to