struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: no getter method exception ?
Date Fri, 13 Dec 2002 18:25:37 GMT
Sorry.  Read the JavaBeans specification.  A JavaBeans property has only
one type.  It's unfortunate that it's not easy to diagnose mistakes in
following the JavaBeans specification.  You often get unintelligible
errors like you got.

> -----Original Message-----
> From: Sash Sash [mailto:swishey911@yahoo.ca]
> 
> I have a form bean that has getter methods that return a 
> string and setter methods that take a string.  That all works 
> great.  I decided to add some setter methods (used in my 
> action class) that accept an int as a parameter.  As soon as 
> I overloaded the original setter methods, i get the following 
> exception: 
> 
> "No getter method for property rounds of bean 
> org.apache.struts.taglib.html.BEAN"
> 
> So before the change, there were two methods for this field in my form
> 
>   public void setRounds(String rounds) {...}
> 
>   public String getRounds() {...}
> 
> Then I added:
> 
>    public void setRounds(int rounds) {...}
> 
> and got the exception listed above.
> 
>  
> 
> Why can't I do this?  The reason I really want this is to be 
> able to use PropertyUtils.copyProperties() to copy from my 
> business beans to my display beans.  Any suggestions?  Thanks 
> in advance!!!
> 
>  
> 
> 
> 
> ---------------------------------
> Post your free ad now! Yahoo! Canada Personals
> 

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


Mime
View raw message