velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <>
Subject Re: How to list Velocity template variables ?
Date Wed, 22 Dec 2010 18:55:24 GMT
2010/12/22 Jean-Baptiste BRIAUD -- Novlog <>:
> On 22 déc. 2010, at 09:08, Antonio Petrelli wrote:
>> So, I think that you might create a tool, or a custom directive, to
>> say that you "require" a particular special object and put it in your
>> template context.
> Unfortunately, I can't do that because I can't force a user not to forget one #require.
> Also to validate the #require are all there, I'll need to get the list of all variables

This is not what I meant. The client will notice that he forgot one
#require when he runs the template, not at upload time.
Anyway, just to help, the starting point is RuntimeInstance.parse
method, that will return the root SimpleNode. All the nodes can be one
in AST* classes.


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

View raw message