velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: non-caching macro library & method pointers
Date Tue, 03 Jun 2003 17:02:06 GMT
Martin Roller said:
> I'm new to velocity and have a few questions.
> The mailarchive
> appears to be down, so sorry if I ask obvious questions.

there are other archives of this list too:

> 1. I would like to use the realoading feature of the global macro library.
>    However, I can only see changes to VM_global_library.vm after the
>    Server is restarted.

if you can't get it working, you could always just leave the 'allow inline to
override global' property as true and do #parse( "VM_global_library.vm" ) in one
of your templates to test.  i do this sometimes in dev.  i would not do it in

> 2. Can I load the global library via another loader? I would like to
>    specify the path relative, e.g. relative to the classpath, so I can
>    pack in a war file.

you can specify multiple resource loaders for Velocity to search when trying to
load a template.  the developer's guide addresses this.

> 3. Is it possible to specify methods at runtime? I would like to to
>    something like the following.
>    #set ($method = "myMethod")
>    $object.$method.$argument

heh.  as Jon used to always say, "this isn't perl."  but you can pull this off
using a tool.  there are two tools available for this in the velocity-tools
project--the RenderTool and the ViewRenderTool.

Nathan Bubna

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

View raw message