public class StrutsBeanWrapper
extends freemarker.ext.beans.BeansWrapper
The StrutsBeanWrapper extends the default FreeMarker BeansWrapper and provides almost no change in functionality, except for how it handles maps. Normally, FreeMarker has two modes of operation: either support for friendly map built-ins (?keys, ?values, etc) but only support for String keys; OR no special built-in support (ie: ?keys returns the methods on the map instead of the keys) but support for String and non-String keys alike. Struts provides an alternative implementation that gives us the best of both worlds.
It is possible that this special behavior may be confusing or can cause problems. Therefore, you can set the struts.freemarker.wrapper.altMap property in struts.properties to false, allowing the normal BeansWrapper logic to take place instead.
EXPOSE_ALL, EXPOSE_NOTHING, EXPOSE_PROPERTIES_ONLY, EXPOSE_SAFE
Constructor and Description |
---|
StrutsBeanWrapper(boolean altMapWrapper,
freemarker.template.Version incompatibleImprovements) |
Modifier and Type | Method and Description |
---|---|
protected freemarker.ext.util.ModelFactory |
getModelFactory(Class clazz) |
checkModifiable, clearClassIntrospecitonCache, clearClassIntrospectionCache, coerceBigDecimal, coerceBigDecimals, coerceBigDecimals, finalizeConstruction, finetuneMethodAppearance, getDefaultDateType, getDefaultInstance, getEnumModels, getExposureLevel, getIncompatibleImprovements, getInstance, getMemberAccessPolicy, getMethodAppearanceFineTuner, getOuterIdentity, getPreferIndexedReadMethod, getStaticModels, getTreatDefaultMethodsAsBeanMembers, getUseCache, invokeMethod, isClassIntrospectionCacheRestricted, isExposeFields, isSimpleMapWrapper, isStrict, isWriteProtected, newInstance, normalizeIncompatibleImprovementsVersion, readField, removeFromClassIntrospectionCache, setDefaultDateType, setExposeFields, setExposureLevel, setMemberAccessPolicy, setMethodAppearanceFineTuner, setMethodsShadowItems, setNullModel, setOuterIdentity, setPreferIndexedReadMethod, setSimpleMapWrapper, setStrict, setTreatDefaultMethodsAsBeanMembers, setUseCache, toPropertiesString, toString, tryUnwrapTo, unwrap, unwrap, wrap, wrap, wrapAsAPI, writeProtect
public StrutsBeanWrapper(boolean altMapWrapper, freemarker.template.Version incompatibleImprovements)
protected freemarker.ext.util.ModelFactory getModelFactory(Class clazz)
getModelFactory
in class freemarker.ext.beans.BeansWrapper
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.