jstl transform question

2003-12-08 Thread
when i write the code below:
x:transform xml=${xml} xslt=${xslt}
x:param name=gg value=0/
/x:transform

my question is what the param useage here,how can i
get the param in xsl file?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: jstl transform question

2003-12-08 Thread Martin van Dijken
Never tried that, but if I'm not mistaken XSL has a mechanism built-in
to retrieve parameters passed from anywhere when the stylesheet is
loaded. Check out the http://www.w3schools.com xsl tutorial and
reference for more info.

Martin

  wrote:

 when i write the code below:
 x:transform xml=${xml} xslt=${xslt}
 x:param name=gg value=0/
 /x:transform
 
 my question is what the param useage here,how can i
 get the param in xsl file?
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 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: jstl transform question

2003-12-08 Thread matsuhashi

when i write the code below:
x:transform xml=${xml} xslt=${xslt}
x:param name=gg value=0/
/x:transform

my question is what the param useage here,how can i
get the param in xsl file?


A XSLT which accepts a param named gg and displays the param's value
would look something like this:

xsl:transform version=1.0 xmlns:xsl
=http://www.w3.org/1999/XSL/Transform;
xsl:param name=gg/

xsl:template match=/
xsl:messagegg is xsl:value-of select=$gg//xsl:message

/xsl:template

/xsl:transform





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



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]



c:out Default Value Escaping

2003-12-08 Thread James Watkin
Request for a new feature, I think:

I'd like to be able to turn off escaping for the default value in the 
c:out tag, but not the regular value if it exists.

Here's what I'm trying to do:
When displaying HTML tables that contain CSS borders, I need to put a blank 
value(nbsp;) in those cells that contain null values, otherwise the 
borders won't appear correctly. This is a common requirement.

With JSTL 1.0, there's a problem if I try to use this pattern:
tdc:out value=${someVariable} default=nbsp; escapeXml=false//td
The problem is that I want escaping turned on for the regular variable 
value, if it exists. Perhaps there should be two new attributes for the 
c:out tag: valueEscapeXml and defaultEscapeXml.

- Jim

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__ 

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


Re: c:out Default Value Escaping

2003-12-08 Thread Nic Werner
I had fun with:

c:choosec:when test=${empty main.outlet_no
}nbsp;/c:whenc:otherwisec:out
value=${main.outlet_no}//c:otherwise/c:choose

- Nic Werner

 Request for a new feature, I think:

 I'd like to be able to turn off escaping for the default value in the
 c:out tag, but not the regular value if it exists.

 Here's what I'm trying to do:
 When displaying HTML tables that contain CSS borders, I need to put a
 blank  value(nbsp;) in those cells that contain null values, otherwise
 the  borders won't appear correctly. This is a common requirement.

 With JSTL 1.0, there's a problem if I try to use this pattern:
 tdc:out value=${someVariable} default=nbsp;
 escapeXml=false//td

 The problem is that I want escaping turned on for the regular variable
 value, if it exists. Perhaps there should be two new attributes for the
 c:out tag: valueEscapeXml and defaultEscapeXml.

 - Jim

 __
 James Watkin
 ACIS Software Development
 The Anderson School at UCLA
 [EMAIL PROTECTED]
 Voice: 1-310-825-5030
Fax: 1-310-825-4835
 __


 - 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 Default Value Escaping

2003-12-08 Thread Serge Knystautas
James Watkin wrote:
With JSTL 1.0, there's a problem if I try to use this pattern:
tdc:out value=${someVariable} default=nbsp; 
escapeXml=false//td
I usually just do:

c:out value=${someVariable} /nbsp;/td

The extra nbsp; in most cases has no effect on how the HTML is rendered.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


c:out Bug in 2nd Form for Default Value?

2003-12-08 Thread James Watkin
In JSTL 1.0 when I try the 2nd form for specifying a default value in a 
c:out tag (as described on page 46 of JSTL in Action):

tdc:out value=${someVariable}someDefaultValue/c:out/td

I get weird results. The default value appears in all of the tds, not 
just the one I've specified. Is this a known bug, or am I using the tag 
incorrectly?

- Jim

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__ 

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


Re: c:out Bug in 2nd Form for Default Value?

2003-12-08 Thread James Watkin
I should have written, The default value appears in all of the subsequent 
tds too, ...

- Jim

At 05:01 PM 12/8/2003 -0800, you wrote:
In JSTL 1.0 when I try the 2nd form for specifying a default value in a 
c:out tag (as described on page 46 of JSTL in Action):

tdc:out value=${someVariable}someDefaultValue/c:out/td

I get weird results. The default value appears in all of the tds, not 
just the one I've specified. Is this a known bug, or am I using the tag 
incorrectly?

- Jim

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__ 

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


How to obtain the check box value when using Display Tag

2003-12-08 Thread Ravi Krishna
Hi All,

I am using Display Tag  to display a list in a table . I have a list of
check boxes in one column. In order to edit or delete a particular row  I
want to identify whether the check box in that row is clicked or not .
I am unable to identify the state of checkbox. Please help me.

regards,Ravi Krishna



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



Re: jstl transform question

2003-12-08 Thread
 --- [EMAIL PROTECTED]  
 when i write the code below:
 x:transform xml=${xml} xslt=${xslt}
 x:param name=gg value=0/
 /x:transform
 
 my question is what the param useage here,how can i
 get the param in xsl file?
 
 
 A XSLT which accepts a param named gg and displays
 the param's value
 would look something like this:
 
 xsl:transform version=1.0 xmlns:xsl
 =http://www.w3.org/1999/XSL/Transform;
 xsl:param name=gg/
 
 xsl:template match=/
 xsl:messagegg is xsl:value-of
 select=$gg//xsl:message
 
 /xsl:template
 
 /xsl:transform
 
 
 
 
 

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

thanks,it works,i just put the xsl:param in wrong
place :D

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



how to parseInt in jstl using express language?

2003-12-08 Thread
see my code as below:
c:set var=var1 value=12/
c:set var=var2 value=5/
c:out value=${var1/var2}/

i declare 2 variables,then i want to do some
calculate.the result is 2.4 here,but my desire result
is 2.
in old jsp,i can use parseInt() method to parse the
variable first.but how to do it in jstl?
i know it maybe a easy problem,but it really confuse
me,i am a newbie in jstl.i have checked sun's jstl
specification and can't find solution either.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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