velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aapo Laakkonen" <>
Subject RE: Variable method name in a macro?
Date Tue, 08 Oct 2002 00:22:14 GMT
> Aapo,
> Here is a small script, using a context tool called 'ff':

Yeah, I have done something similar, but this does not work as I want it

> #set($test = "getSig()")
> 1-$ff.$test<br>
> ##note that this is merely a reference

Ok. This is what I want. How can I use that? For me output like
"" is completely useless.

> 2-$ff.getSig()<br>
> 3-$ff.Sig<br>

These are not dynamic, cause method names are hard-coded.

> Here's the output:
> 2-This is FF, your friendly formatter
> 3-This is FF, your friendly formatter

Yeah I know. How does these relate to the first line:

    #set($test = "getSig()") ?

Is it impossible to have #eval directive built-in Velocity? There is
already quite useless #stop directive, so why not to add #eval? It's not
bloat! It's useful directive, trust me, :-)! Or maybe we should modify
#parse directive to also parse strings, not only files. What do you
think? Are these insane ideas?

Kind Regards
Aapo Laakkonen

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

View raw message