velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claude Brisson" <cla...@savoirweb.com>
Subject Re: Can't call methods that take interface!?
Date Thu, 10 Oct 2002 15:52:00 GMT
Have you checked the method was public ?

CloD
----- Original Message -----
From: "Rickard Öberg" <rickard@dreambean.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: jeudi 10 octobre 2002 13:48
Subject: Can't call methods that take interface!?


> Hey
>
> I've come across a little problem. I have a method in a bean that has a
> method that takes an interface. In my template I have access to an
> object that implements that interface. For some reason I can't call that
> method. Velocity doesn't seem to find it. If the method and object is of
> a simple class, such as String, it works.
>
> Here's the actual case: I have an object implementing User. My bean has
> a formatting method "String nameOf(User aUser)" that will extract the
> name and format it properly. I want to access this in my template like this:
> $format.nameOf($thread.creator)
>
> (btw, it's a forum thingy)
>
> But it doesn't work. Any ideas how to get it to work, or why it's not
> working?
>
> /Rickard
>
> --
> Rickard Öberg
> rickard@dreambean.com
> Senselogic
>
> Got blog? I do. http://dreambean.com
>
>
> --
> To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message