コード例 #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";
  }
コード例 #2
0
  /**
   * 更新模板文件和系统内容设定
   *
   * @return
   */
  @Action(
      value = "updateTemplatesetT",
      results = {@Result(name = "json", type = "json")})
  public String updateTemplatesetT() {

    TemplatesetT tst = new TemplatesetT();
    tst.setTsid(this.getTsid());
    tst.setTemplateurl(this.getTemplateurl());
    tst.setSystemcontent(this.getSystemcontent().trim());
    tst.setBuildhtmlpath(this.getBuildhtmlpath());
    tst.setCreatetime(BaseTools.systemtime());
    tst.setCreatorid(BaseTools.adminCreateId());
    tst.setSign(this.getSign());
    // 获取模板主题和状态
    TemplateT tt = new TemplateT();
    tt = this.getTemplateTService().findTemplateBysign(this.getSign(), "1");
    if (tt != null) {
      tst.setThemeid(tt.getThemeid());
      tst.setThemename(tt.getThemename());
      tst.setStatus(tt.getStatus());
    }
    if (this.getTemplatesetTService().updateTemplatesetT(tst) > 0) {
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
コード例 #3
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);
   }
 }