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
BeansWrappercan now expose public fields of objects to the template if you call thesetExposeFields(true)on it. More info...BeansWrappercan now pass any sequence model to Java methods expecting ajava.util.Collectionor a native Java array (including primitive arrays). More info...BeansWrappercan now pass any sequence and collection model to Java methods expecting ajava.lang.Iterable. More info...BeansWrappercan 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
BeansWrapperwould pass ajava.util.Collectionto a method expecting ajava.util.Setin certain rare cases. More info...Support for JDK 1.5 enums in
BeansWrapperandDefaultObjectWrapper. 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 nameenumsin the data-model, you can write expressions likeenums["java.math.RoundingMode"].UPin the template. The enum values can be used as scalars and support equality and inequality comparisons. More info...freemarker.ext.rhino.RhinoWrappernow correctly translates RhinoUndefinedinstance,UniqueTag.NOT_FOUND, andUniqueTag.NULLto FreeMarker undefined value.