use of com.haulmont.cuba.portal.config.PortalConfig in project cuba by cuba-platform.
the class FreeMarkerView method buildTemplateModel.
@Override
protected SimpleHash buildTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) {
PortalConfig config = AppBeans.get(Configuration.class).getConfig(PortalConfig.class);
SimpleHash context = super.buildTemplateModel(model, request, response);
SecurityContext securityContext = AppContext.getSecurityContext();
if (securityContext != null)
context.put("userSession", securityContext.getSession());
context.put("messages", messages);
context.put("message", new MessageMethod());
context.put("theme", config.getTheme());
return context;
}
Aggregations