Re: setting variables from within a custom TemplateDirectiveModel
Antonio Petrelli <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
2010/2/26 Grégory Joseph <[email protected]>: > Now, what I'd need is to push variables to be used by this body. Take a look at how Tiles-Freemarker integration works: http://svn.eu.apache.org/repos/asf/tiles/framework/trunk/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/context/FreeMarkerUtil.java In other words: <snip> Object obj; // Your object to put. ... TemplateModel model = env.getObjectWrapper().wrap(obj); env.setVariable(name, model); </snip> HTH Antonio ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev