velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: How to list Velocity template variables ?
Date Wed, 22 Dec 2010 08:08:41 GMT
2010/12/20 Jean-Baptiste BRIAUD -- Novlog <j-b.briaud@novlog.com>:
> Before processing a template, I need to have a list of all variables needed by the template.
> I had to proceed to complex validation.
>...
> The reason why I need that : the end user can upload a template.

Sorry for the late response, but I was thinking about your question
and it has not a good answer.
For example, suppose that you use a #set directive, or a tool that
fills one variable, have you got to remove it from the list of
variables?
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.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message