velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Geiger <>
Subject calling arbitrary methods from within template
Date Fri, 13 Dec 2002 15:04:05 GMT

I'd like to call arbitrary-named methods from a velocity template, e.g.
printMessage("...") or pushRock(myRock) (just referring to the user's guide ...).
Unfortunately Velocity always seems to assume that I'm using
property-accessor methods (i.e. getters and setters). Is there a possibility to call such
arbitrary-named methods and further use their return values (which would be
calculated whilst method-execution) or do I have to use "Prepared Objects" which
I put into the Velocity-context and which contain the data I want to access
in a JavaBeans-like manner (i.e. I have to setup them in my java programs)?

The background for wanting to call arbitrary-named methods is that I have to
access the data I must process from an UML repository (Novosoft) where all
necessary information is neatly stored, but not always in a JavaBeans-like

Thanks for all replies,

Jan Geiger

+++ GMX - Mail, Messaging & more +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!

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

View raw message