velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Huffstedtler" <>
Subject creating references to arbitrary hashtable
Date Mon, 27 Oct 2008 15:27:26 GMT
Hi folks -


I am helping a group migrate some content from Coldfusion to Velocity.
In their CF code, they have a custom tag which they use in individual
pages for grouping commonly used page variables into a pseudo-object
before passing it off to the page wrapper.  The model is very similar to
the use of the VelocityLayoutServlet, so that's the direction I'm going
for the migration.


However, trying to set properties on a VTL identifier does not seem to
work if the identifier does not reference an object.  The documentation
does not make it clear that that is a requirement
#references).  The description of properties implies that one can
associate a VTL identifier with a hashtable, but there aren't clear
directions for doing so.


Putting this -


#set ( $ = "Foo")


In my index.vm and referencing it like this in my Default.vm:




Is just resulting in $ being output as a literal.


Can someone point me in the right direction here?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message