| Line 97... |
Line 97... |
| 97 |
attributesMap.put("dateMonthYearFormatter", dateMonthYearFormatter);
|
97 |
attributesMap.put("dateMonthYearFormatter", dateMonthYearFormatter);
|
| 98 |
attributesMap.put("dateMonthChYear", dateMonthChYear);
|
98 |
attributesMap.put("dateMonthChYear", dateMonthChYear);
|
| 99 |
attributesMap.put("decimalFormatter", decimalFormatter);
|
99 |
attributesMap.put("decimalFormatter", decimalFormatter);
|
| 100 |
attributesMap.put("noData", "<tr><td colspan=\"20\" style=\"text-align:center;\">No results found for the given criteria</td></tr>");
|
100 |
attributesMap.put("noData", "<tr><td colspan=\"20\" style=\"text-align:center;\">No results found for the given criteria</td></tr>");
|
| 101 |
attributesMap.put("dateTimeFormatter", dateTimeFormatter);
|
101 |
attributesMap.put("dateTimeFormatter", dateTimeFormatter);
|
| 102 |
attributesMap.put("version", "300");
|
102 |
attributesMap.put("version", "301");
|
| 103 |
attributesMap.put("cssVersion", "26");
|
103 |
attributesMap.put("cssVersion", "26");
|
| 104 |
attributesMap.put("isDev", getActiveProfile().equals("dev"));
|
104 |
attributesMap.put("isDev", getActiveProfile().equals("dev"));
|
| 105 |
attributesMap.put("vmUtils", new Utils());
|
105 |
attributesMap.put("vmUtils", new Utils());
|
| 106 |
//attributesMap.put("esc", new EscapeTool());
|
106 |
//attributesMap.put("esc", new EscapeTool());
|
| 107 |
attributesMap.put("ru", RoundingMode.HALF_UP);
|
107 |
attributesMap.put("ru", RoundingMode.HALF_UP);
|
| Line 117... |
Line 117... |
| 117 |
bean.setExposeSpringMacroHelpers(true);
|
117 |
bean.setExposeSpringMacroHelpers(true);
|
| 118 |
bean.setAttributesMap(this.velocityAttributesMap());
|
118 |
bean.setAttributesMap(this.velocityAttributesMap());
|
| 119 |
return bean;
|
119 |
return bean;
|
| 120 |
}
|
120 |
}
|
| 121 |
|
121 |
|
| 122 |
// @Bean
|
- |
|
| 123 |
// public ViewResolver freemarkerViewResolver() {
|
- |
|
| 124 |
// FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
|
- |
|
| 125 |
// resolver.setCache(true);
|
- |
|
| 126 |
// resolver.setPrefix("");
|
- |
|
| 127 |
// resolver.setSuffix(".ftl");
|
- |
|
| 128 |
// return resolver;
|
- |
|
| 129 |
// }
|
- |
|
| 130 |
|
- |
|
| 131 |
@Bean
|
122 |
@Bean
|
| 132 |
public ViewResolver beanNameViewResolver() {
|
123 |
public ViewResolver beanNameViewResolver() {
|
| 133 |
BeanNameViewResolver resolver = new BeanNameViewResolver();
|
124 |
BeanNameViewResolver resolver = new BeanNameViewResolver();
|
| 134 |
return resolver;
|
125 |
return resolver;
|
| 135 |
}
|
126 |
}
|
| 136 |
|
127 |
|
| 137 |
@Bean
|
128 |
@Bean
|
| 138 |
public VelocityConfigurer velocityConfig() {
|
129 |
public VelocityConfigurer velocityConfig() {
|
| 139 |
VelocityConfigurer velocityConfigurer = new VelocityConfigurer();
|
130 |
VelocityConfigurer velocityConfigurer = new VelocityConfigurer();
|
| 140 |
Properties velocityProperties = new Properties();
|
131 |
Properties velocityProperties = new Properties();
|
| - |
|
132 |
velocityProperties.put("velocimacro.library", "macros.vm");
|
| - |
|
133 |
velocityProperties.put("velocimacro.permissions.allow.inline", "true");
|
| - |
|
134 |
velocityProperties.put("velocimacro.permissions.allow.inline.to.replace.global", "true");
|
| 141 |
velocityProperties.put("directive.set.null.allowed", "true");
|
135 |
velocityProperties.put("directive.set.null.allowed", "true");
|
| 142 |
velocityConfigurer.setVelocityProperties(velocityProperties);
|
136 |
velocityConfigurer.setVelocityProperties(velocityProperties);
|
| 143 |
velocityConfigurer.setResourceLoaderPath(VELOCITY_PATH_PREFIX);
|
137 |
velocityConfigurer.setResourceLoaderPath(VELOCITY_PATH_PREFIX);
|
| 144 |
return velocityConfigurer;
|
138 |
return velocityConfigurer;
|
| 145 |
}
|
139 |
}
|