velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Wolf" <christian.w...@idbsoft.ch>
Subject Re: some problems in my velocity template
Date Wed, 28 Mar 2001 10:14:20 GMT
you have right,

1)  show us the method signature of getID().  Is it

      public String getID()
                ------

So we have found the problem, thanks a lot

- christian


----- Original Message -----
From: "Geir Magnusson Jr." <geirm@optonline.net>
To: <velocity-user@jakarta.apache.org>
Sent: Wednesday, March 28, 2001 12:51 PM
Subject: Re: some problems in my velocity template


> 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($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 ???
>
> Do two things for diagnostics so we can help :
>
> 1)  show us the method signature of getID().  Is it
>
>      public int getID()
>
> ?
>
> 2) 'print' out $anInt just after the first #set() to be sure that there
> is a valid value.
>
> geir
>
> --
> Geir Magnusson Jr.                               geirm@optonline.net
> Developing for the web?  See http://jakarta.apache.org/velocity/
>


Mime
View raw message