Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 87880 invoked from network); 3 Dec 2004 21:12:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Dec 2004 21:12:03 -0000 Received: (qmail 82231 invoked by uid 500); 3 Dec 2004 21:11:57 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 82206 invoked by uid 500); 3 Dec 2004 21:11:57 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 82192 invoked by uid 99); 3 Dec 2004 21:11:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from rwcrmhc13.comcast.net (HELO rwcrmhc13.comcast.net) (204.127.198.39) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 03 Dec 2004 13:11:55 -0800 Received: from [192.168.2.93] (maximus.jgsullivan.com[68.79.151.2]) by comcast.net (rwcrmhc13) with ESMTP id <2004120321115201500mac1se>; Fri, 3 Dec 2004 21:11:53 +0000 Mime-Version: 1.0 Message-Id: In-Reply-To: <014401c4d978$76445870$0200a8c0@DELL1800> References: <20041203193738.40427.qmail@web50402.mail.yahoo.com> <16d6c620041203115960af2675@mail.gmail.com> <014401c4d978$76445870$0200a8c0@DELL1800> Date: Fri, 3 Dec 2004 15:09:59 -0600 To: "Niall Pemberton" , "Struts Developers List" From: Joe Germuska Subject: Re: ActionForm.validateForm(...) to replace ActionForm.validate(...) Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N At 8:41 PM +0000 12/3/04, Niall Pemberton wrote: >Wouldn't it be better to get rid of this in 1.3 with the move to Chain? >Doesn't everything get thrown up in the air and re-defined at that point >including Action's being deprecated in favour of objects that just implement >the Command interface? I guess I had figured on 1.3 being more transitional than that. But, even if one were to use a command instead of an action, we haven't talked (yet) about changing the validation model. I haven't heard anyone propose a major change to the model of "Struts populates an ActionForm and calls a method on it which tests its validity and is able to return a bundle of messages explaining validation errors if there are any." My preference would be to defer any changes that dramatic until 1.4, although with the chain, it would be a little easier for people to prototype those kinds in the sandbox or on SourceForge (or whereever...) Perhaps it is worth trying to come up with a more future proof implementation, though. This isn't a burning issue -- clearly people are confused about the ActionMessages/ActionErrors situation, but I think that's "under control." By future-proof, I mean something that passes in the resources-equivalent of ActionMessages, and possibly which passes in something like a "ValidationContext" which would eliminate the explicit dependency on HttpServletRequest. Joe >Niall > >----- Original Message ----- >From: "Martin Cooper" >To: "Struts Developers List" >Sent: Friday, December 03, 2004 7:59 PM >Subject: Re: ActionForm.validateForm(...) to replace >ActionForm.validate(...) > > >> We did just get Commons Resources promoted out of the sandbox, and I'm >> hopeful that we'll get that puppy released soon. Finally! >> >> -- >> Martin Cooper >> >> >> On Fri, 3 Dec 2004 11:37:38 -0800 (PST), David Graham >> wrote: >> > We didn't do it earlier because we wanted to use commons-resources for >> > message passing. That hasn't happened so we may as well add the >> > validateForm() method and deprecate validate(). >> > >> > David >> > >> > >> > >> > --- Joe Germuska wrote: >> > >> > > In order to push forward on full deprecation of ActionErrors, I >> > > propose adding the following method to ActionForm: >> > > >> > > public ActionMessages validateForm(ActionMapping mapping, >> > > HttpServletRequest >request) { >> > > >> > > return validate(mapping, request); >> > > >> > > } >> > > >> > > and then changing one line in the Request Processing chain: >> > > >> > > ActionMessages errors = form.validate(mapping, request); >> > > to >> > > ActionMessages errors = form.validateForm(mapping, request); >> > > >> > > I'm not sure now why we haven't done this earlier. Someone suggested >> > > it on one of the lists a while ago and it seemed clear once I saw it, >> > > but I haven't had time to do anything about it. >> > > >> > > My inclination is to do this only on the 1.3 (HEAD) branch, and to >> > > make the change in RequestProcessor.java even though it is slated for >> > > obsolescence, and then also to make the change in >> > > o.a.s.chain.AbstractValidateActionForm (which actually still uses >> > > ActionErrors, actually.) >> > > >> > > If it didn't seem strange that it hasn't been done already, I might >> > > have just gone ahead and done it without raising the question -- so >> > > I'm wondering if I'm missing something? >> > > >> > > Joe >> > > >> > > -- >> > > Joe Germuska >> > > Joe@Germuska.com >> > > http://blog.germuska.com >> > > "Narrow minds are weapons made for mass destruction" -The Ex >> > > >> > > --------------------------------------------------------------------- >> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >> > > For additional commands, e-mail: dev-help@struts.apache.org > > > > >> > > >> > >> > >> > __________________________________________________ >> > Do You Yahoo!? >> > Tired of spam? Yahoo! Mail has the best spam protection around >> > http://mail.yahoo.com >> > >> > >> > >> > --------------------------------------------------------------------- >> > 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 >> >> >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >For additional commands, e-mail: dev-help@struts.apache.org -- Joe Germuska Joe@Germuska.com http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org