阅读背景:

ztree和tabs的结合运用

来源:互联网 

action:

 // 形成市场客户公司的树节点  public String marketjson() throws Exception {   try {    List<Org> dlist = bdao.list("from Org d where d.flag=3");    StringBuffer str = new StringBuffer();    str.append("[");    for (int j = 0; j < dlist.size(); j++) {     Long pId = 0L;     if (dlist.get(j).getSuperOrg() != null       && dlist.get(j).getSuperOrg().getOrgId() != null) {      pId = dlist.get(j).getSuperOrg().getOrgId();     }     if (j == dlist.size() - 1) {      str.append("{id:" + dlist.get(j).getOrgId() + ",pId:" + pId        + ",name:'" + dlist.get(j).getName() + "',t:'"        + dlist.get(j).getName() + "'}");     } else {      str.append("{id:" + dlist.get(j).getOrgId() + ",pId:" + pId        + ",name:'" + dlist.get(j).getName() + "',t:'"        + dlist.get(j).getName() + "'},");     }    }    str.append("]");    outJson(str.toString());   } catch (Exception e) {    e.printStackTrace();   }   return "ajax";  } // 形成市场客户公司的树节点  public String




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: