FreeMarker Blog

The official weblog of the FreeMarker project

Friday, January 26, 2007


To folks who get this blog on RSS feed -- sorry for the last two posts (they have been deleted now). They don't have anything to do with FreeMarker, and were meant to go to my personal blog, and ended up by my mistake on this blog...

Wednesday, January 24, 2007

FreeMarker 2.3.9 released

FreeMarker 2.3.9 is now available.

You can download it directly from here

This release adds support for accessing Java 5 enums and public fields of classes in templates, as well one bugfix in RhinoWrapper.

Detailed changes on the Java side:
  • BeansWrapper can now expose public fields of objects to the template if you call the setExposeFields(true) on it.

  • Support for JDK 1.5 enums in BeansWrapper and DefaultObjectWrapper. By calling the getEnumModels() method, you can retrieve a hash model that is keyed by class names and allows access to enumerated values. I.e. if you bind this hash model under name enums in the data model, you can write expressions like enums["java.math.RoundingMode"].UP in the template. The enum values can be used as scalars and support equality and inequality comparisons.

  • freemarker.ext.rhino.RhinoWrapper now correctly translates Rhino Undefined instance, UniqueTag.NOT_FOUND, and UniqueTag.NULL to FreeMarker undefined value.

Please note that currently only is up-to-date regarding 2.3.9. will be updated as soon as I get access credentials to it.