Exemplo n.º 1
0
 @Bean
 public FreeMarkerView annotations(FreeMarkerViewBuilder builder) throws TemplateModelException {
   FreeMarkerView view = builder.setUrl("/edu/dfci/cccb/mev/web/views/annotations.ftl").build();
   view.addStaticAttribute(
       "Dimension$Type", getDefaultInstance().getEnumModels().get(Type.class.getName()));
   return view;
 }
Exemplo n.º 2
0
 @Override
 protected void renderMergedTemplateModel(
     Map<String, Object> model, HttpServletRequest request, HttpServletResponse response)
     throws Exception {
   // 上下文路径
   model.put("ctx", request.getContextPath());
   // 让iframe的session共享
   response.addHeader("P3P", "CP=CAO PSA OUR");
   super.renderMergedTemplateModel(model, request, response);
 }
 @Override
 protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request)
     throws Exception {
   super.exposeHelpers(model, request);
   model.put(BASE_PATH, request.getContextPath());
 }
Exemplo n.º 4
0
 /** 在model中增加部署路径base,方便处理部署路径问题。 */
 @SuppressWarnings({"unchecked", "rawtypes"})
 protected void exposeHelpers(Map model, HttpServletRequest request) throws Exception {
   super.exposeHelpers(model, request);
   model.put(CONTEXT_PATH, request.getContextPath());
 }