tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <h...@gefionsoftware.com>
Subject Re: c:set can't set JavaBean property
Date Thu, 19 Dec 2002 03:00:46 GMT
Mike Cantrell wrote:
> Okay, I think the problem is that my getter method returns a String but 
> the setterMethod takes an integer:
> 
>    public String getDay();
>    public void setDay(int day);
> 
> If I change it to return an integer, it works fine.. I find this 
> especially weird since getDay() isn't ever called in any of the code.
 > [...]

That's the problem, and it doesn't matter if you call one or the other
or not. The JavaBeans rules that defines what's a property says that
both the getter and the setter must be of the same type, if they are
both implemented.

Hans
-- 
Hans Bergsten                                <hans@gefionsoftware.com>
Gefion Software                       <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <http://TheJSPBook.com/>


--
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