c:out and default - question on code.

2003-12-08 Thread Antony Paul
Hi,
I tried to write a tag handler class which have an attribute default.
But javac wont compile it. Then how the c:out default works. How I could do
the same ?

rgds
Antony Paul


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:out and default - question on code.

2003-12-08 Thread Martin van Dijken
Hey Antony,

Create a Tag class and make sure it has a method setDefault(String 
default) Then make sure you add the attribute default to your tag's tld 
description.

Martin

Antony Paul wrote:

Hi,
I tried to write a tag handler class which have an attribute default.
But javac wont compile it. Then how the c:out default works. How I could do
the same ?
rgds
Antony Paul
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: c:out and default - question on code.

2003-12-08 Thread Antony Paul
Declaring a varible names default gives this error by javac.
JspOutTag.java:12: identifier expected
 private String default;

rgds
Antony Paul.

- Original Message -
From: Martin van Dijken [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 6:27 PM
Subject: Re: c:out and default - question on code.


 Hey Antony,

 Create a Tag class and make sure it has a method setDefault(String
 default) Then make sure you add the attribute default to your tag's tld
 description.

 Martin

 Antony Paul wrote:

  Hi,
  I tried to write a tag handler class which have an attribute
default.
  But javac wont compile it. Then how the c:out default works. How I
could do
  the same ?
 
  rgds
  Antony Paul
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:out and default - question on code.

2003-12-08 Thread Felipe Leme
Antony,

default is a reserved word. You can have the setDefault() and getDefault() 
methods, but hot the default variable. Instead, you should use _default, 
theDefault, ddefault, or something like that (notice that as you are 
encapsulating this variable through the getters and setters, its real name 
doesn't matter).

In particular, JSTL use default_ :

OutTag.java:


private String default_;// stores EL-based property





Felipe


On Monday 08 December 2003 11:12 am, Antony Paul wrote:
 Declaring a varible names default gives this error by javac.
 JspOutTag.java:12: identifier expected
  private String default;


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:out and default - question on code.

2003-12-08 Thread Antony Paul
So no need for the variable name be the same in tld descriptor and tag
handler class. Thanks for the info.

Antony Paul.

- Original Message -
From: Felipe Leme [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 6:47 PM
Subject: Re: c:out and default - question on code.


 Antony,

 default is a reserved word. You can have the setDefault() and getDefault()
 methods, but hot the default variable. Instead, you should use _default,
 theDefault, ddefault, or something like that (notice that as you are
 encapsulating this variable through the getters and setters, its real name
 doesn't matter).

 In particular, JSTL use default_ :

 OutTag.java:


 private String default_; // stores EL-based property





 Felipe


 On Monday 08 December 2003 11:12 am, Antony Paul wrote:
  Declaring a varible names default gives this error by javac.
  JspOutTag.java:12: identifier expected
   private String default;


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]