On this page
2.3.9
Date of release: 2007-01-23
This release contains support for accessing JDK 1.5 enums and public fields of classes from the templates through the BeansWrapper.
Changes on the Java side
BeansWrapper
can now expose public fields of objects to the template if you call thesetExposeFields(true)
on it. More info...BeansWrapper
can now pass any sequence model to Java methods expecting ajava.util.Collection
or a native Java array (including primitive arrays). More info...BeansWrapper
can now pass any sequence and collection model to Java methods expecting ajava.lang.Iterable
. More info...BeansWrapper
can now unwrap numeric models into correct target types when passing to Java methods expecting a primitive or boxed number. Use of various expert built-ins to manually coerce the types becomes mostly unnecessary.Fixed a bug where
BeansWrapper
would pass ajava.util.Collection
to a method expecting ajava.util.Set
in certain rare cases. More info...Support for JDK 1.5 enums in
BeansWrapper
andDefaultObjectWrapper
. By calling thegetEnumModels()
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 nameenums
in the data-model, you can write expressions likeenums["java.math.RoundingMode"].UP
in the template. The enum values can be used as scalars and support equality and inequality comparisons. More info...freemarker.ext.rhino.RhinoWrapper
now correctly translates RhinoUndefined
instance,UniqueTag.NOT_FOUND
, andUniqueTag.NULL
to FreeMarker undefined value.