|
From: Cameron B. <ca...@da...> - 2004-03-03 11:24:31
|
Darren, Yeah I make heavy usage of freemarker. Are you still using the FreemarkerServlet ? my requirements for Configuration are pretty simple at the moment, within a subclass of FreemarkerServlet : createConfiguration() - I run configuration.setSharedVariable a few times to add=20 - converter utils - formatter utils - money utils - an ognl tool - an enum template model (to allow me to access hibernate persistent string enums) protected boolean preTemplateProcess( HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel templateModel) - I add some request scoped components - browser identifyer tool - url generating tool like the velocity link tool (depends on request) - toolbox - custom url generation for things like actions, jsessionid encoding, http/https changing etc.. protected ObjectWrapper createObjectWrapper()=09 - I configure the BeansWrapper with .setSimpleMapWrapper(true); I also use freemarker for generation of emails, without using the freemarker servlet To do this I just add some beans into a map (the toolbox and other utils above) and call template.process(nmap, stringWriter); I am keen to look at the code that you have prepared, especially since it will be added into spring after 1.0 final. Can you sent it to me ? Thanks, Cameron. > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of Darren Davison > Sent: Wednesday, 3 March 2004 8:50 PM > To: spr...@li... > Subject: [Springframework-developer] FreeMarker >=20 > (sorry if this is a dupe - problems here with my webmail) >=20 > for info: >=20 > I've added FreeMarker integration to my local sources along=20 > very similar lines to the Velocity code. It's working well=20 > at home in an existing Velocity project that's had its=20 > templates migrated to FTL. Should be ready to commit after=20 > 1.0-final, ready for 1.1-m1 >=20 > If there's anyone who makes heavy use of FreeMarker currently=20 > (I believe Cameron said he did?), could you let me know which=20 > features you're employing - particularly where it pertains to=20 > Configuration objects=20 > (http://freemarker.sourceforge.net/docs/api/freemarker/templat > e/Configuration.html)? > FM has a non-bean-friendly interface into much of the API=20 > and I'd like to ensure that I get this integration meeting=20 > existing needs early on. >=20 > Cheers, > -- > Darren Davison > Public Key: http://www.davison.uk.net/key.jsp >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |