tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: JSTL confused by overloading accessor methods
Date Thu, 09 Jan 2003 18:57:55 GMT
On Thu, 9 Jan 2003, Travis McCauley wrote:

> I've just spent about eight hours trying to figure out a bug in my 
> web-app and it seems to have been caused by overloading a set method. 

This is by design -- or at least the expected behavior.  The JavaBeans
introspector ignores overloaded methods when looking for properties.  For
a JavaBean property 'xxx' to exist (in the default case without BeanInfo
classes), three things must be true:

 - A getXxx() method or setXxx() method must exist.

 - If they both exist, the return type of getXxx() must match the
   type of the formal parameter in setXxx().  That is, in

     TYPE getXxx()

   and

     void setXxx(TYPE x)

   'TYPE' must be the same.

 - No more than one setXxx() method may exist.

-- 
Shawn Bayern
"JSTL in Action"   http://www.manning.com/bayern


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message