Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-07 Thread Pierre Delisle
Alex, Until the expert group rules on this, one workaround (that will always work) is to simply do the following (assuming a property of type Object): instead of: use: Another way is to define a PropertyEditor associated with your property of type Object. As Craig men

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-07 Thread Alex Tang
Maya Muchnik wrote: > Why you cannot use only one setter "public setIndex (String index)" and then inside >check if the > string is convertable to integer or not? This way your index can represent a number >or "all". In Tocmat 3.x, your suggestion works if the tag looks like: OR

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-07 Thread Maya Muchnik
Why you cannot use only one setter "public setIndex (String index)" and then inside check if the string is convertable to integer or not? This way your index can represent a number or "all". "Craig R. McClanahan" wrote: > Alex Tang wrote: > > > Thanks for the quick reply Craig. > > > > A follo

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-07 Thread Craig R. McClanahan
Alex Tang wrote: > Thanks for the quick reply Craig. > > A followup question. In tomcat 3.1, I was able to do > > public setIndex ( Object o ) > > If this is legal, I can do my own internal checking to see if the object "o" is a >String or an > int. However in Tomcat 4.0, I get an error w

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-07 Thread MUKUNDAN PARTHASARATHY
ered-To: mailing list [EMAIL PROTECTED] >Date: Tue, 06 Feb 2001 21:02:48 -0800 >From: "Alex Tang" <[EMAIL PROTECTED]> >X-Accept-Language: en >MIME-Version: 1.0 >To: [EMAIL PROTECTED], [EMAIL PROTECTED] >Subject: Is it legal to have multiple taglib setter methods for

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-06 Thread Alex Tang
Thanks for the quick reply Craig. A followup question. In tomcat 3.1, I was able to do public setIndex ( Object o ) If this is legal, I can do my own internal checking to see if the object "o" is a String or an int. However in Tomcat 4.0, I get an error when I try to do this. I saw som

Re: Is it legal to have multiple taglib setter methods for the same property

2001-02-06 Thread Craig R. McClanahan
IIRC, having two setters with different argument types violates the JavaBeans specification. In addition, it seems to cause the Java reflection APIs to think that there is no setter method at all, so you will get complaints about a read-only property from any JSP implementation that uses this t

Is it legal to have multiple taglib setter methods for the same property

2001-02-06 Thread Alex Tang
Hi folks. (My apologies for crossposting, I wasn't sure if this is a taglib question or a tomcat question/problem) I'm writing a taglib using the JSP 1.1 spec (currently Tomcat 3.x). I'm having a problem with a property "set" method. I have a taglib tag which takes one parameter: "index". This