|
From: Cameron B. <ca...@da...> - 2004-03-09 07:45:23
|
I havn't done any real integration with the sandbox code, but one = suggestion that I can make is to move the core freemarker configuration classes = from web into somewhere else, sice its not just a web technology. I use freemarker for email generation as well as views. I would presume that the same can be said and done for velocity, even = xslt etc.. Cameron > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of Darren Davison > Sent: Saturday, 6 March 2004 6:12 AM > To: spr...@li... > Subject: [Springframework-developer] FreeMarker >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > I've committed freemarker ui and view components to the=20 > sandbox as there are a couple of things still outstanding to=20 > do, and they're not fully tested. >=20 > Cameron - if you're able to take a look and see if you can=20 > get the shared variables aspect working in your project that=20 > would be helpful. >=20 > Specify a FreemarkerConfig bean in your servlet context file like so; >=20 > <!-- freemarker config --> > <bean > id=3D"freemarkerConfig" > class=3D"org.springfr...view.freemarker.FreemarkerConfigurer" >=20 > <!-- optional --> > <property name=3D"freemarkerSettings"> > <props> > <prop key=3D"localized_lookup">true</prop> > <!-- etc... --> > </props> > </property> >=20 > <!-- optional --> > <map name=3D"freemarkerVariables"> > <entry key=3D"my_helper"> > <ref local=3D"freemarkerHelperObject"/> > </entry> > <!-- etc... --> > </map> > </bean> >=20 >=20 >=20 > and similar to the following to define a view; >=20 > fmView.class=3Dorg.springframework.web.servlet.view.freemarker.F > reemarkerView > # if you don't specify a templateContext, WEB-INF/freemarker=20 > will be # searched for templates fmView.templateContext=3DWEB-INF/ftl > fmView.url=3Dtest.ftl >=20 >=20 >=20 > - --=20 >=20 > Darren Davison > Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP=20 > SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) >=20 > iD8DBQFASN8IKLMLAN01aw0RAqClAJ4pPlH0MaHWvp2TPxk4j3/T6J3rqwCdG4ny > DOuc/+gNCQrVqZdPuFB7Ug0=3D > =3DpFHR > -----END PGP SIGNATURE----- >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > Linux tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo technologies. Learn everything from fundamentals to=20 > system = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |