Package org.g4studio.core.tplengine

Examples of org.g4studio.core.tplengine.FileTemplate


      grantList.addAll(userGrantList);
    }
    Dto dto = new BaseDto();
    dto.put("grantList", grantList);
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
    DefaultTemplate template = new FileTemplate();
    template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
    StringWriter writer = engine.mergeTemplate(template, dto);
    try {
      pageContext.getOut().write(writer.toString());
    } catch (IOException e) {
      log.error(G4Constants.Exception_Head + e.getMessage());
View Full Code Here


    String defaultLayout = WebUtils.getParamValue("APP_LAYOUT", request);
    layout = G4Utils.isEmpty(layout) ? defaultLayout : layout;
    dto.put("layout", layout);
    dto.put("themeColor", getThemeColor(theme));
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
    DefaultTemplate template = new FileTemplate();
    template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
    StringWriter writer = engine.mergeTemplate(template, dto);
    String treesString = generateCardTrees(dto);
    return treesString + "\n" + writer.toString();
  }
View Full Code Here

      pathDto.put("01", rootName);
      Dto dto = new BaseDto();
      dto.put("menuList", generateMenuPathName(menuList, pathDto));
      dto.put("menuid", cardVo.getMenuid());
      TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
      DefaultTemplate template = new FileTemplate();
      template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName(), "CardTreesTag.tpl"));
      StringWriter writer = engine.mergeTemplate(template, dto);
      treesString = treesString + "\n" + writer.toString();
    }
    return treesString + "\n});" + scriptEnd;
  }
View Full Code Here

TOP

Related Classes of org.g4studio.core.tplengine.FileTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.