> Fecha: Tue, 9 Jul 2002 09:47:07 -0700 (PDT) > De: "Craig R. McClanahan" <[EMAIL PROTECTED]> > A: Struts Users Mailing List > <[EMAIL PROTECTED]> > Asunto: Re: DynaActionForm Advantages > > > > > The problem was that the DAF class was not made > final. > > Allowing it to be subclassed is creating the mess > you > > describe--the variables in the XML file and > actions on > > them in the DAF subclass. (Another was writing > about > > putting member variable initializations in the > > validate() function--the DAF subclass may also > start > > encouraging other messier programming habits.) > > > > As for those who don't like getter/setters and > want to > > use the common-beanutils "get" functions described > by > > Craig: Might it have been better, in addition to > > making the DAF class final, > > Making DAF final would have prevented the use case > where you want to > subclass it for custom reset() or validate() > methods. This would have > forced the use of two classes instead of one -- IMHO > that would have been > more confusing, not less. >
Exactly--that's the advantage of making the DAF final! If one wishes to have custom reset() or validate() methods, one needs to trot back to the ActionForm. The only programming/configuration of any type you should be able to do for a DAF is in the form beans section of the struts-config file. The DAF seems to me just a nice enhancement from 1.0.2 because you no longer need to create ActionForm subclasses for jsp's not needing validation. And AF is then for when you do have specific validation--and it would be good if we can give programmers the option in the future of using either the beanutils get()/set() functions or the JavaBeans getter/setter functions within the AF. Glen _________________________________________________________ Do You Yahoo!? Informaci�n de Estados Unidos y Am�rica Latina, en Yahoo! Noticias. Vis�tanos en http://noticias.espanol.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

