Date: 2004-09-21T11:29:13
Editor: KrisSchneider <[EMAIL PROTECTED]>
Wiki: Apache Struts Wiki
Page: BeanPropertyNames
URL: http://wiki.apache.org/struts/BeanPropertyNames
no comment
New Page:
##language:en
#pragma section-numbers off
The rules for property names are really pretty simple. They're explained in the
Java``Doc for the {{{java.beans.Introspector.decapitalize}}} mehtod as well as in the
[http://java.sun.com/products/javabeans/docs/spec.html JavaBeans Specification]
(Section ''8.8 Capitalization of inferred names''). As you might expect, the rules are
actually codified in {{{java.beans.Introspector.decapitalize}}}. Here's a snippet from
the Spec:
...we normally convert the first character to lower case. However to support the
occasional use of all upper-case names, we check if the first two characters of the
name are both upper case and if so leave it alone. So for example,[[BR]]
"Foo``Bah" becomes "fooBah"[[BR]]
"Z" becomes "z"[[BR]]
"URL" becomes "URL"[[BR]]
We provide a method Introspector.decapitalize which implements this conversion rule.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]