Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 35702 invoked from network); 18 Feb 2003 18:50:13 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 18 Feb 2003 18:50:13 -0000 Received: (qmail 40750 invoked by uid 1059); 18 Feb 2003 18:50:12 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Feb 2003 18:50:12 -0000 Date: Tue, 18 Feb 2003 10:50:12 -0800 (PST) From: "Craig R. McClanahan" To: Jakarta Commons Users List Subject: RE: [Digester] SetPropertiesRule In-Reply-To: Message-ID: <20030218104714.T38919@icarus.apache.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, 18 Feb 2003, Durham David Cntr 805CSS/SCBE wrote: > Date: Tue, 18 Feb 2003 12:26:17 -0600 > From: Durham David Cntr 805CSS/SCBE > Reply-To: Jakarta Commons Users List > To: Jakarta Commons Users List > Subject: RE: [Digester] SetPropertiesRule > > Still haven't received much on this. Guess no one is interested. > It's not a lack of interest; it's timing. We're trying to get a 1.4.1 bugfix release out the door and don't want to disrupt anything. > Some additional comments on this to attempt to get someone to bite, then > I will take this to a different, probably more appropriate forum. > > It seems that given a getter/setter method you can determine a property > name, but not visa versa. Seems backwards. In other words the domain > of property names does not have a one to one mapping to the domain of > getter/setter names. Concretely, if you had a property of "xOffset" > there is no getter / setter name that corresponds to it(?). Kinda > limited. I guess this would qualify as a design flaw? > Ultimately, Digester and BeanUtils depend on your JDK's implementation of java.beans.Introspector to identify what are valid properties, and what the getter and setter method names are. It doesn't do anything magical on its own (except for "mapped properties" which are an extension to the JavaBeans standard). Bottom line - there's nothing that Digester and BeanUtils can do if the Introspector class doesn't implement the JavaBeans spec correctly, and/or does some things beyond the spec. > Dave Craig > > > -----Original Message----- > > From: Craig R. McClanahan [mailto:craigmcc@apache.org] > > Sent: Friday, February 14, 2003 5:28 PM > > To: Jakarta Commons Users List > > Subject: Re: [Digester] SetPropertiesRule > > > > > > > > > > On Fri, 14 Feb 2003, Durham David Cntr 805CSS/SCBE wrote: > > > > > Date: Fri, 14 Feb 2003 15:57:28 -0600 > > > From: Durham David Cntr 805CSS/SCBE > > > Reply-To: Jakarta Commons Users List > > > > > To: commons-user@jakarta.apache.org > > > Subject: [Digester] SetPropertiesRule > > > > > > Having a problem with digester.setProperties(String). > > > > > > I have the following xml doc: > > > > > > > > > > > > > > > > > > > > > The property does not get set in the bean unless the "x" in > > xOffset is > > > capitalized, i.e., "XOffset" which doesn't seem right. > > > > > > Is this a bug? > > > > > > > No, it's not. Welcome to the wonderful world of the > > JavaBeans rules on > > converting property names to getter and setter method names. > > > > Normally, property names are expressed in "mixedCase" style, > > starting with > > a lower case letter, and this would get converted into a call on a > > setMixedCase() method. For property names where the > > getter/setter method > > is all upper case (i.e. getURL/setURL), there are some > > special rules; this > > is also true when the first capital is in the second position > > (as it is in > > your case). > > > > The details of the naming patterns are in the JavaBeans Specification, > > which you can get from: > > > > http://java.sun.com/products/javabeans/ > > > > Craig > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > >