You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Christian Wolf <ch...@idbsoft.ch> on 2001/03/27 10:35:57 UTC
Problem with method in velocity template !
Hi all,
I have a problem in a velocity template.
I call the following method in my velocity template :
#set ($anInt = $url.getID()) ## url.getID returns an int
#set ($myPath = $kei.getPath($urlId, $data))
wich corresponds in my java code to :
kei.getPath(int anInt, RunData data)
I have put the "kei" object in context.
My problem is when in hardcode an int in my method, the code run correctly,
but when I write my method like $kei.getPath($urlId, $data)) with the $urlId
variable, the code doen't work ! (maybe a problem between String and int ?)
Any idea ???
- Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Problem with method in velocity template !
Posted by Christian Wolf <ch...@idbsoft.ch>.
Yes, I have seen that I made a mistake, but I have posted my mail again with
the modification. See the next lines... I have rea ly a problem in my
template !
Hi all, (sorry to ask my question again, but I made a mistake in my previous
mail, now it's right, and the problem realy exits)
I have a problem in a velocity template.
I call the following method in my velocity template :
#set ($anInt = $url.getID()) ## url.getID returns an int
#set ($myPath = $kei.getPath($anInt, $data))
wich corresponds in my java code to :
kei.getPath(int anInt, RunData data)
I have put the "kei" object in context.
My problem is when in hardcode an int in my method, the code run correctly,
but when I write my method like $kei.getPath($anInt, $data)) with the $anInt
variable, the code doen't work ! (maybe a problem between String and int ?)
Any idea ???
- Christian
---- Original Message -----
From: "John McNally" <jm...@collab.net>
To: <tu...@jakarta.apache.org>
Sent: Tuesday, March 27, 2001 8:16 PM
Subject: Re: Problem with method in velocity template !
> I suppose this is just an error in describing the problem, but just in
> case
>
> you are setting $anInt and then trying to use $urlId.
>
> John McNally
>
> Christian Wolf wrote:
> >
> > Hi all,
> >
> > I have a problem in a velocity template.
> >
> > I call the following method in my velocity template :
> >
> > #set ($anInt = $url.getID()) ## url.getID returns an int
> > #set ($myPath = $kei.getPath($urlId, $data))
> >
> > wich corresponds in my java code to :
> >
> > kei.getPath(int anInt, RunData data)
> >
> > I have put the "kei" object in context.
> >
> > My problem is when in hardcode an int in my method, the code run
correctly,
> > but when I write my method like $kei.getPath($urlId, $data)) with the
$urlId
> > variable, the code doen't work ! (maybe a problem between String and
int ?)
> >
> > Any idea ???
> >
> > - Christian
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Problem with method in velocity template !
Posted by John McNally <jm...@collab.net>.
I suppose this is just an error in describing the problem, but just in
case
you are setting $anInt and then trying to use $urlId.
John McNally
Christian Wolf wrote:
>
> Hi all,
>
> I have a problem in a velocity template.
>
> I call the following method in my velocity template :
>
> #set ($anInt = $url.getID()) ## url.getID returns an int
> #set ($myPath = $kei.getPath($urlId, $data))
>
> wich corresponds in my java code to :
>
> kei.getPath(int anInt, RunData data)
>
> I have put the "kei" object in context.
>
> My problem is when in hardcode an int in my method, the code run correctly,
> but when I write my method like $kei.getPath($urlId, $data)) with the $urlId
> variable, the code doen't work ! (maybe a problem between String and int ?)
>
> Any idea ???
>
> - Christian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org