velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rickard Öberg <rick...@dreambean.com>
Subject Can't call methods that take interface!?
Date Thu, 10 Oct 2002 11:48:28 GMT
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>


Mime
View raw message