<%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBegin.jsp"%> <% String PG_TITLE = null; String PG_CONTENT_TITLE = null; String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字 String PG_LEFT_WIDTH = "320";//默认的treeview宽度 OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "代码语言配置", "right"); String sTempId = "xxxxx"; @SuppressWarnings("unchecked") List bos = JBOFactory.createBizObjectQuery("jbo.sys.CODE_CATALOG", "CodeName is not null and CodeName <> ' ' and exists (select 1 from jbo.sys.CODE_LIBRARY CI where CI.CodeNo = O.CodeNo and CI.IsInUse = '1') order by CodeTypeOne, CodeTypeTwo, CodeName").getResultList(false); String sOldCodeTypeOne = null, sOldCodeTypeTwo = null; String sCodeTypeOneId = null, sCodeTypeTwoId = null; for(BizObject bo : bos){ String sCodeTypeOne = bo.getAttribute("CodeTypeOne").getString(); String sCodeTypeTwo = bo.getAttribute("CodeTypeTwo").getString(); String parentId; if(!StringX.isSpace(sCodeTypeOne) && !StringX.isSpace(sCodeTypeTwo)){ if(!sCodeTypeOne.equals(sOldCodeTypeOne)){ sCodeTypeOneId = tviTemp.insertFolder("root", sCodeTypeOne, "", 0); sOldCodeTypeOne = sCodeTypeOne; } if(!sCodeTypeTwo.equals(sOldCodeTypeTwo)){ sCodeTypeTwoId = tviTemp.insertFolder(sCodeTypeOneId, sCodeTypeTwo, "", 0); sOldCodeTypeTwo = sCodeTypeTwo; } parentId = sCodeTypeTwoId; }else{ parentId = sTempId; } tviTemp.insertPage(parentId, bo.getAttribute("CodeName").getString()+"("+bo.getAttribute("CodeNo").getString()+")", bo.getAttribute("CodeNo").getString(), "", 0); } tviTemp.insertFolder(sTempId, "root", "不明确分类", "", "", 0); tviTemp.insertPage(sTempId, "未定义类别", sTempId, "", 0); %> <%@include file="/Resources/CodeParts/View04.jsp"%> <%@ include file="/IncludeEnd.jsp"%>