struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject RE: JavaScriptTag and multiple forms.
Date Sun, 04 Apr 2004 20:05:32 GMT


> -----Original Message-----
> From: Joe Germuska [mailto:Joe@Germuska.com]
> Sent: Saturday, April 03, 2004 3:10 PM
> To: Struts Developers List
> Subject: Re: JavaScriptTag and multiple forms.
>
>
> >  > If you did that, how would it know whether to use the 'path' or the
> >>  'name' to look up the validation rules?
> >
> >Wouldn't it alway use the 'name' it looked up from the given action ?
> >Is there a time it would ever use the 'path' ? I guess I don't
> understand ?
>
> What if you were using ValidatorActionForm/DynaValidatorActionForm
> instead of ValidatorForm/DynaValidatorForm?  Then the server side
> validation rules are looked up based on the path, not the name.  With
> the form classes, this can be encapsulated cleanly in a way that is
> invisible in the struts-config, (and even more so thanks to Niall's
> recent patch)  But that's invisible to the html:javascript tag.
>
> By the way, the names for those classes have to be one of the most
> confusing things about Struts; I only just really grokked the
> difference in the last couple of months, and most of the developers I
> work with are still kind of fuzzy about it.

+1000! The first time I looked at these to figure out why we had two, I
actually thought they were the same. It wasn't until I really studied the
Javadocs that I realised the difference. (Yay for Javadocs!) I'm still not
clear, though, on why we actually *need* two different mechanisms.

--
Martin Cooper


> There is something attractive about somehow involving the ActionForm
> class in the client side validation, but that seems kind of
> challenging.  Maybe for Struts 2.0... ?
> --
> Joe Germuska
> Joe@Germuska.com
> http://blog.germuska.com
>        "Imagine if every Thursday your shoes exploded if you tied them
> the usual way.  This happens to us all the time with computers, and
> nobody thinks of complaining."
>              -- Jef Raskin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message