Thanks a) part worked well for me !
apache-10 wrote: > > several possibilities: > > a) You can use the experimental TemplateTool to programmatically get a > list of references to check against the context before rendering: > > http://svn.apache.org/repos/asf/velocity/engine/trunk/experimental/templatetool/TemplateTool.java > > b) Use an buffering writer and a ReferenceInsertionEventHandler to stop > rendering if something is missing > > c) Check with #if($!myvar != null) before using reference content (as in > previous answer to this thread). > > Hope this helps somehow, > Christoph > > Captain Cid wrote: >> I have a template containing some variables to be rendered from context. >> Is there way by which i can know if all the variables are present in the >> context, otherwise throw an error. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > > > -- View this message in context: http://www.nabble.com/checking-if-all-variables-are-present-tp24696207p24815339.html Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org