commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: [beanutils] not finding the setter
Date Wed, 02 Jul 2003 22:05:13 GMT
> Would you agree that BeanUtils should find the set<PropertyName>, if it
> regardless of its position within the descriptors returned by 
> java.beans.Introspector?

Do you mean in general, or for the code you posted?

Since properties can be read-only (no set method) it first looks for the
is/get method to determine the type.  In your case, it saw the boolean
isBound() method.  Right there it decided that the 'bound' property was of
type boolean.  Now it goes looking for the setBound(boolean b) method, which
it did not find.  So it decided that the boolean 'bound' method was

The other two methods that have String types are extraneous and IME cause
the introspection process to get horribly confused and refuse to work with
your property.  (You can achieve this same result by overloading the 'set'
method with different types, something many Struts newbies try with their
Form beans.)

Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message