I agree with Craig here, in that I just happened to be looking at this config file today, and found this precise syntax quite confusing.
>From: "Craig R. McClanahan" <[EMAIL PROTECTED]> >Reply-To: "Struts Developers List" <[EMAIL PROTECTED]> >To: Struts Developers List <[EMAIL PROTECTED]> >Subject: Re: PlugIn (Craig) >Date: Sat, 30 Mar 2002 15:30:25 -0800 (PST) >MIME-Version: 1.0 >Received: from [192.18.49.131] by hotmail.com (3.2) with ESMTP id >MHotMailBE6F959C005240043154C0123183A2F60; Sat, 30 Mar 2002 15:30:36 -0800 >Received: (qmail 15250 invoked by uid 97); 30 Mar 2002 23:30:32 -0000 >Received: (qmail 15239 invoked from network); 30 Mar 2002 23:30:32 -0000 >From struts-dev-return-7497-aphelionx Sat, 30 Mar 2002 15:32:04 -0800 >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm >Precedence: bulk >List-Unsubscribe: <mailto:[EMAIL PROTECTED]> >List-Subscribe: <mailto:[EMAIL PROTECTED]> >List-Help: <mailto:[EMAIL PROTECTED]> >List-Post: <mailto:[EMAIL PROTECTED]> >List-Id: "Struts Developers List" <struts-dev.jakarta.apache.org> >Delivered-To: mailing list [EMAIL PROTECTED] >In-Reply-To: <[EMAIL PROTECTED]> >Message-ID: <[EMAIL PROTECTED]> >X-Spam-Rating: localhost 1.6.2 0/1000/N >X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > > >On Sat, 30 Mar 2002, David Winterfeldt wrote: > > > Date: Sat, 30 Mar 2002 11:44:43 -0800 (PST) > > From: David Winterfeldt <[EMAIL PROTECTED]> > > Reply-To: Struts Developers List <[EMAIL PROTECTED]> > > To: Struts Developers List <[EMAIL PROTECTED]> > > Subject: PlugIn (Craig) > > > > It looks like when you made changes to the PlugIn > > Craig that it broke the ValidatorPlugIn. Having > > multiple set-property elements under the plug-in used > > to work, but now it looks like only the last one is > > being kept. It looks like the addition of > > PlugInSetPropertyRule in ConfigRuleSet broke this. > > You probably know the digester better than I do if > > this could be changed. Or point me in the right > > direction if you don't have time to do this. > > > > <plug-in > > className="org.apache.struts.validator.ValidatorPlugIn"> > > <set-property property="pathname" > > value="/WEB-INF/validator-rules.xml"/> > > <set-property property="pathname" > > value="/WEB-INF/validation.xml"/> > > </plug-in> > > > >The change to the PlugIn configuration did indeed change this, but I'm not >so sure it's a "bad thing" that needs to be fixed. > >The basic issue is that PlugInConfig maintains a simple name-value Map for >the configured properties, which is then returned via getProperties() and >then used as an argument to BeanUtils.populate() to configure the >instantiated PlugIn object. So, supporting your syntax above would >require either an API modification, or a change to the contract about what >PlugInConfig.getProperties() returns. > >My discomfort with going ahead and doing this is based on the fact that it >is somewhat counterintuitive to expect a JavaBean property setter for a >scalar String property to accept and use multiple values when called >mulitple times -- the user of such a bean is going to expect replacement >semantics in this scenario. It would also not be possible to implement >configuration of this if we extended the DTD to include a specific PlugIn >(and could therefore use attributes instead of nested <set-property/> >elements), because XML doesn't allow multiple attributes with the same >name. > >Wouldn't it be better to use a comma-delimited list (or something like >that) so you can set this with one setPathname() method? > > > David > > > >Craig > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>