Examples of FileTemplate


Examples of org.g4studio.core.tplengine.FileTemplate

    dto.put("cls", visible == "true" ? "" : "x-hidden");
    dto.put("swfModelPath", contextPath + "/resource/fcf/" + FcfConstant.getReportModel(type));
    String xmlString = (String)request.getAttribute(dataVar);
    dto.put("reportXMLData", xmlString);
    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

Examples of org.g4studio.core.tplengine.FileTemplate

    StringBuffer sb = new StringBuffer();
    sb.append(TagConstant.SCRIPT_START);
    Dto dto = new BaseDto();
    String[] arrayFields = fields.split(",");
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
    DefaultTemplate template = new FileTemplate();
    template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
    for (int i = 0; i < arrayFields.length; i++) {
      List codeList = WebUtils.getCodeListByField(arrayFields[i], request);
      dto.put("codeList", codeList);
      dto.put("field", arrayFields[i]);
      StringWriter writer = engine.mergeTemplate(template, dto);
View Full Code Here

Examples of org.g4studio.core.tplengine.FileTemplate

    sb.append(TagConstant.SCRIPT_START);
    Dto dto = new BaseDto();
    dto.put("showCode", showCode.toLowerCase());
    String[] arrayFields = fields.split(",");
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
    DefaultTemplate template = new FileTemplate();
    template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
    for (int i = 0; i < arrayFields.length; i++) {
      if (arrayFields[i].indexOf(":") != -1) {
        String field = arrayFields[i].substring(0, arrayFields[i].indexOf(":"));
        dto.put("field", field);
        List codeList = WebUtils.getCodeListByField(field, request);
View Full Code Here

Examples of org.g4studio.core.tplengine.FileTemplate

    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    Dto dto = new BaseDto();
    dto.put("contextPath", request.getContextPath());
    dto.put("uxType", uxType.toLowerCase());
    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

Examples of org.g4studio.core.tplengine.FileTemplate

      theme = resultDto.getAsString("theme");
    String defaultTheme = WebUtils.getParamValue("SYS_DEFAULT_THEME", request);
    theme = G4Utils.isEmpty(theme) ? defaultTheme : theme;
    dto.put("theme", theme);
    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

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

Examples of org.g4studio.core.tplengine.FileTemplate

    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

Examples of org.g4studio.core.tplengine.FileTemplate

      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

Examples of org.webmacro.engine.FileTemplate

            //          ", name=" + name);
            if (file.canRead())
            {
                try
                {
                    template = new FileTemplate
                        (broker, file,
                         TurbineWebMacroService.DEFAULT_ENCODING);
                    template.parse();
                    return template;
                }
View Full Code Here

Examples of org.webmacro.engine.FileTemplate

            //          ", name=" + name);
            if (file.canRead())
            {
                try
                {
                    template = new FileTemplate
                        (broker, file,
                         TurbineWebMacroService.DEFAULT_ENCODING);
                    template.parse();
                    return template;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.