RE: Custom Tags Bug? Please help...

2000-11-15 Thread Duffey, Kevin

I would think class is a reserved word in java. For example MyClass.class
refers to the Class of the class. I would rename it from class to myClass or
something. Same for your getter/setter methods.

 -Original Message-
 From: Claudio Cordova [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 15, 2000 9:55 AM
 To: Orion-Interest
 Subject: Custom Tags Bug? Please help...
 
 
 Hello, I have questions about custom tags, I don't know for 
 sure they are
 bugs but they seem like it.
 
 BUG #1
 
 I have a custom tag with a required attribute called "class". 
 When I use it
 in a page the compiler displays an error like:
 
  500 Internal Server Error
 
 Error parsing JSP page /webdev/advtags/forTag.jsp line 13
 
 Property 'class' of bean/tag 
 'com.taglib.wdjsp.mut.ForPropertyTag' is read
 only
 
 
 The tag has a "setClass" method. Why is this happening? If I 
 change the
 attribute name to anything else it works!
 
 
 BUG #2
 
 The method "isValid" from the TagExtraInfo class is getting 
 called as many
 times as there are attributes in the tag...Each time the 
 TagData object has
 one more attribute value?  Is this correct?
 
 
 




RE: Custom Tags Bug? Please help...

2000-11-15 Thread Scott Stirling

It is.  It's so obvious it can easily be overlooked:

For example:

public class Foo extends Object { }

How do you get a class to compile that has a field named 'class'?  I
couldn't do it.  The normal convention is to use the field name 'clazz' when
you mean 'class' in Java.

One thing to check is that the type of this variable is the same when its
set(Type t) and get(){ return Type t;} methods are called, and that you
aren't mixing types with a 1.3 JVM.  The 1.3 JVM is stricter about some of
the JavaBean conventions.

Scott Stirling

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin
Sent: Wednesday, November 15, 2000 4:03 PM
To: Orion-Interest
Subject: RE: Custom Tags Bug? Please help...


I would think class is a reserved word in java. For example MyClass.class
refers to the Class of the class. I would rename it from class to myClass or
something. Same for your getter/setter methods.

 -Original Message-
 From: Claudio Cordova [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 15, 2000 9:55 AM
 To: Orion-Interest
 Subject: Custom Tags Bug? Please help...


 Hello, I have questions about custom tags, I don't know for
 sure they are
 bugs but they seem like it.

 BUG #1

 I have a custom tag with a required attribute called "class".
 When I use it
 in a page the compiler displays an error like:

  500 Internal Server Error

 Error parsing JSP page /webdev/advtags/forTag.jsp line 13

 Property 'class' of bean/tag
 'com.taglib.wdjsp.mut.ForPropertyTag' is read
 only


 The tag has a "setClass" method. Why is this happening? If I
 change the
 attribute name to anything else it works!


 BUG #2

 The method "isValid" from the TagExtraInfo class is getting
 called as many
 times as there are attributes in the tag...Each time the
 TagData object has
 one more attribute value?  Is this correct?