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 the
setExposeFields(true)on it. More info...
BeansWrappercan now pass any sequence model to Java methods expecting a
java.util.Collectionor a native Java array (including primitive arrays). More info...
BeansWrappercan now pass any sequence and collection model to Java methods expecting a
java.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 a
java.util.Collectionto a method expecting a
java.util.Setin certain rare cases. More info...
Support for JDK 1.5 enums in
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
enumsin the data-model, you can write expressions like
enums["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 Rhino
UniqueTag.NULLto FreeMarker undefined value.