ztree v3.5.18樹異步加載開發(續)

    java代碼

   CatalogTree.java


    private String id;

    private String pId;

    private String name;

    private String isParent;

    @RequestMapping(value = "/queryCatalogTree")
    @ResponseBody
    public Object queryCatalogTree(HttpServletRequest request, String catalogID, String type, Model model)
    {
        List<Object> catalogTreeList = new ArrayList<Object>();

            CatalogTree catalogTree = null;
            for (int i = 0; i < dataArray.size(); i++)
            {
                JSONObject data = dataArray.getJSONObject(i);
                catalogTree = new CatalogTree();
                catalogTree.setId(data.getString("catalogID"));
                catalogTree.setpId(data.getString("parentCatalogID"));
                catalogTree.setName(data.getString("catalogName"));
                catalogTree.setIsParent("true");
                catalogTreeList.add(catalogTree);
            }
        }

        return catalogTreeList;
    }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章