velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pfeifer" <Daniel.Pfei...@tradedoubler.com>
Subject RE: Calling methods in a velocity template
Date Wed, 31 May 2006 14:35:18 GMT
I found out what the problem is. Velocity doesn't support inner classes.
Thanks anyways!
/Daniel

-----Original Message-----
From: Nathan Bubna [mailto:nbubna@gmail.com] 
Sent: den 31 maj 2006 16:21
To: Velocity Users List
Subject: Re: Calling methods in a velocity template

to call a method, it must be a public method in a public class.  also,
make sure your variables have the right type.

$myUtils.class.name
$variableone.class.name
$variabletwo.class.name


On 5/31/06, Daniel Pfeifer <Daniel.Pfeifer@tradedoubler.com> wrote:
> I've got following piece of code:
>
>
>
> $myUtils.encode($variableone,$variabletwo)
>
>
>
> ($myUtils is a class called MyUtils which I added to the Context by
> context.put("myUtils", new MyUtils()).
>
>
>
> Encode is supposed to return a string and takes two strings, however,
> nothing happens except that
"$myUtils.encode($variableone,$variabletwo)"
> is printed to the screen.
>
>
>
> Why oh why?
>
>
>
> Thanks in advance,
>
> Daniel
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message