Setting string to a variable [message #41697] |
Mon, 11 February 2008 12:29  |
Eclipse User |
|
|
|
Originally posted by: pankaj.surti.xxxx.com
Hi,
I use the following syntax to set the variable with string value.
<c:setVariable select="'Somevalue'" var="ctlType"/>
I do get the value correctly when I use
(context.getVariable("ctlType").toString());
My questions is:
Is this correct way to use the "select"?
Thanks,
-Pankaj.
|
|
|
Re: Setting string to a variable [message #41846 is a reply to message #41697] |
Wed, 13 February 2008 11:10  |
Eclipse User |
|
|
|
Yes.
And, in addition to using Java code, you could use:
<c:get select="$ctlType"/>
You can also use:
<c:setVariable select=" 3 " var="someNumericVar"/>
And, for that matter, you can loop via:
<c:iterate select=" 10 " var="index">
index: <c:get select="$index"/>
</c:iterate>
Paul
"pankaj" <pankaj.surti@xxxx.com> wrote in message
news:0e815c8f13613ae88b2df9d5663e30e6$1@www.eclipse.org...
> Hi,
>
> I use the following syntax to set the variable with string value.
>
> <c:setVariable select="'Somevalue'" var="ctlType"/>
>
> I do get the value correctly when I use
> (context.getVariable("ctlType").toString());
>
>
> My questions is:
>
> Is this correct way to use the "select"?
>
> Thanks,
> -Pankaj.
>
|
|
|
Powered by
FUDForum. Page generated in 0.25825 seconds