struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Fyffe" <str...@sixty4bit.com>
Subject RE: Overloaded Setters in Form
Date Tue, 24 Dec 2002 18:12:48 GMT
Edgar does have a point, the spec doesn't say beans *bad joke* about
overloading.  I gave it another go after reading (AGAIN) Craig's first
post on this topic (12/14/2002) and this time, instead of using a null
getter, I provided a getter for the overloaded setter.  Still does not
work.  Introspector only returns one PropertyDescriptor for the
property.  Edgar and Craig both lead me to believe that this is
possible, but I am starting to think that I am trying to put a square
peg in a round hole.

Edgar: Would you be willing to share some of your implementation
details?

Architectural Gurus: The problem I am trying to solve is that I have a
data source that returns Strings only (xml file), should I create Beans
specifically for that data source and then convert over to my Form?

Thanks for all of your help,

Carl



-----Original Message-----
From: Edgar P. Dollin [mailto:edgar@blue-moose.net] 
Sent: Tuesday, December 24, 2002 10:26 AM
To: 'Struts Developers List'
Subject: RE: Overloaded Setters in Form


I have had success overloading properties and used the effect liberally.
I have found that if you are consistent in your overloading, i.e. for
every setter of type x supply a getter of type x as well (at least in
the containers I am using) they seem to function.  

Based on your comments, I have a concern that something will break going
forward.  I looked for overloading in the spec (attached) and they don't
specifically speak to the issue.

	http://java.sun.com/products/javabeans/docs/beans.101.pdf

Could you point me toward some documentation which gives more details?

Thanks

Edgar

-----Original Message-----
From: Ted Husted [mailto:husted@apache.org] 
Sent: Tuesday, December 24, 2002 9:12 AM
To: Struts Developers List
Subject: Re: Overloaded Setters in Form


It's contrary to the JavaBean specification to overload the 
property methods (getters and setters), if that's what you are 
trying to do. So, it won't work, because it's not suppose to.

-Ted.


12/23/2002 10:31:41 PM, Carl Fyffe <struts@sixty4bit.com> wrote:
>Seasons greetings friends!
>
>I sent an email inquiring about overloaded setters in Forms to the
>struts-user mailing list.  I was told that I needed a BeanInfo. 
> I gave
>the BeanInfo a try and it did not work.  So, I started reading
>code and
>decided that an overloaded example in TestBean was needed.  Of 
course it
>now fails just like my example.  I am stuck there.  The BeanInfo's that

>I have created, with and without my overloaded methods, do not  work.
>Does anyone have a TestBeanBeanInfo that works?  Any advice would
> be
>greatly appreciated.
>
>Carl
>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-dev-
unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-dev-
help@jakarta.apache.org>
>
>




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


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


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


Mime
View raw message