velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rickard Öberg <>
Subject Can't call methods that take interface!?
Date Thu, 10 Oct 2002 11:48:28 GMT

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:

(btw, it's a forum thingy)

But it doesn't work. Any ideas how to get it to work, or why it's not 


Rickard Öberg

Got blog? I do.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message