Ejemplo n.º 1
0
  /**
   * 获取模板文件和系统内容的输出路径
   *
   * @return
   */
  @Action(
      value = "getTemplateOutHtmlPath",
      results = {@Result(name = "json", type = "json")})
  public String getTemplateOutHtmlPath() {

    List<TemplatesetT> list =
        this.getTemplatesetTService().findAllTemplatesetWithNoParam(BaseTools.adminCreateId());
    if (list != null) {
      this.setTemplatesetstrs("<option value='-1'>---请选择---</option>");
      for (Iterator<TemplatesetT> it = list.iterator(); it.hasNext(); ) {
        TemplatesetT tst = (TemplatesetT) it.next();
        this.templatesetstrs +=
            "<option value='"
                + tst.getBuildhtmlpath()
                + "'>"
                + tst.getSystemcontent()
                + "</option>";
      }
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
Ejemplo n.º 2
0
 public void ProcessTemplatesetTlist(List<TemplatesetT> list) {
   rows.clear();
   for (Iterator<TemplatesetT> it = list.iterator(); it.hasNext(); ) {
     TemplatesetT tst = (TemplatesetT) it.next();
     tst.setStatus(StaticKey.DataUsingState.getName(tst.getStatus()));
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", tst.getTsid());
     cellMap.put(
         "cell",
         new Object[] {
           tst.getThemename(),
           tst.getSystemcontent(),
           tst.getSign(),
           tst.getStatus(),
           tst.getTemplateurl(),
           tst.getBuildhtmlpath(),
           BaseTools.formateDbDate(tst.getCreatetime()),
           "<a  id='edittemplateset' href='templateset.jsp?operate=edit&folder=setting&tsid="
               + tst.getTsid()
               + "' name='edittemplateset'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }