use of freemarker.template.DefaultObjectWrapperBuilder in project moco by dreamhead.
the class TemplateResourceReader method createConfiguration.
private Configuration createConfiguration(final TemplateLoader templateLoader, final Charset charset) {
Configuration cfg = new Configuration(CURRENT_VERSION);
cfg.setObjectWrapper(new DefaultObjectWrapperBuilder(CURRENT_VERSION).build());
cfg.setDefaultEncoding(charset.name());
cfg.setTemplateLoader(templateLoader);
return cfg;
}
use of freemarker.template.DefaultObjectWrapperBuilder in project ninja by ninjaframework.
the class TemplateEngineFreemarker method createBeansWrapperWithExposedFields.
private BeansWrapper createBeansWrapperWithExposedFields() {
DefaultObjectWrapperBuilder defaultObjectWrapperBuilder = new DefaultObjectWrapperBuilder(INCOMPATIBLE_IMPROVEMENTS_VERSION);
defaultObjectWrapperBuilder.setExposeFields(true);
DefaultObjectWrapper defaultObjectWrapper = defaultObjectWrapperBuilder.build();
return defaultObjectWrapper;
}
use of freemarker.template.DefaultObjectWrapperBuilder in project spring-framework by spring-projects.
the class FreeMarkerView method getObjectWrapper.
/**
* Return the configured FreeMarker {@link ObjectWrapper}, or the
* {@link ObjectWrapper#DEFAULT_WRAPPER default wrapper} if none specified.
* @see freemarker.template.Configuration#getObjectWrapper()
*/
protected ObjectWrapper getObjectWrapper() {
ObjectWrapper ow = getConfiguration().getObjectWrapper();
Version version = Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS;
return (ow != null ? ow : new DefaultObjectWrapperBuilder(version).build());
}
Aggregations