⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 treeviewrender.java

📁 基于Sturts+Spring+Hibernate的一个高级销售管理系统。内容丰富
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
	//
	// return content.toString();
	// }

	// public static String selectTree(TreeViewElement treeElmt, boolean
	// bHidden,int isDept) {
	// StringBuffer content = new StringBuffer();
	// content.append("<li id=" + treeElmt.getID() + ">");//???li???
	// if (bHidden &&
	// treeElmt.canExpand())//??????????????????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/plus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else if (treeElmt.canExpand())//?????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/minus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else//????????????
	// content.append("<img src=/wbflow/images/blank.gif>");
	// if(treeElmt.getActiveFlag() == Constants.ACTIVEFLAG_NO){
	// content.append("<img src=/wbflow/images/folder1.gif><a
	// href=\"javascript:selectPosition('" + treeElmt.getID() + "','" +
	// treeElmt.getNodeName() + "')\" ");//??????????
	// }else{
	// if(isDept == Constants.IS_SELECT_DEPT_YES){
	// content.append("<img src=/wbflow/images/folder.gif><a
	// href=\"javascript:selectPosition('" + treeElmt.getID() + "','" +
	// treeElmt.getNodeName() + "')\" ");//??????????
	// }else{
	// content.append("<img src=/wbflow/images/folder.gif><a href=\"#\"
	// ");//??????????
	// }
	// }
	// if (treeElmt.canExpand())//??????????????????showHide???
	// content.append("onclick=\"showHide('" + treeElmt.getID() + "')\"");
	// content.append(">" + treeElmt.getNodeName() + "</a>");
	// if (treeElmt.canExpand()) {//???????????????UL??????????
	// content.append("<ul");
	// if (bHidden)
	// content.append(" style=\"display:none;\" ");
	// content.append(">");
	// TreeViewElement[] elmts = treeElmt.getChildren();//???????????
	// for (int i = 0; i < elmts.length; i++)
	// content.append(selectTree(elmts[i], bHidden,isDept));//?????????????
	// content.append("</ul>");
	// }
	// content.append("</li>");//???????<li>???
	// return content.toString();
	// }

	// public static String selectTree2(TreeViewElement treeElmt, boolean
	// bHidden,int lastId) {
	// StringBuffer content = new StringBuffer();
	// content.append("<li id=" + treeElmt.getID() + ">");//???li???
	// if (bHidden &&
	// treeElmt.canExpand())//??????????????????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/plus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else if (treeElmt.canExpand())//?????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/minus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else//????????????
	// content.append("<img src=/wbflow/images/blank.gif>");
	// if(treeElmt.getActiveFlag() == Constants.ACTIVEFLAG_NO){
	// content.append("<img src=/wbflow/images/folder1.gif><a
	// href=\"javascript:selectPosition('" + treeElmt.getID() + "','" +
	// treeElmt.getNodeName() + "')\" ");//??????????
	// }else{
	// content.append("<img src=/wbflow/images/folder.gif><a href=\"#\"
	// ");//??????????
	// }
	// if (treeElmt.canExpand())//??????????????????showHide???
	// content.append("onclick=\"showHide('" + treeElmt.getID() + "')\"");
	// content.append(">" + treeElmt.getNodeName() + "</a>");
	// if (treeElmt.canExpand() && treeElmt.getID() != lastId)
	// {//???????????????UL??????????
	// content.append("<ul");
	// if (bHidden)
	// content.append(" style=\"display:none;\" ");
	// content.append(">");
	// TreeViewElement[] elmts = treeElmt.getChildren();//???????????
	// for (int i = 0; i < elmts.length; i++)
	// content.append(selectTree2(elmts[i], bHidden,lastId));//?????????????
	// content.append("</ul>");
	// }
	// content.append("</li>");//???????<li>???
	// return content.toString();
	// }

	// public static String selectDepartment(String isCan) {
	// StringBuffer content = new StringBuffer();
	//		
	// content.append("d = new dTree('d');");
	// List<TreeView> tvList = new TreeViewDaoImpl().getAllTreeByParentId(1);
	// for(int i =0 ; i < tvList.size();i++){
	// if(tvList.get(i).getActiveFlag() == Constants.ACTIVEFLAG_YES){
	// content.append("d.add(" + tvList.get(i).getId() + "," +
	// tvList.get(i).getParentId()+ ",'" + tvList.get(i).getName() +
	// "',\"javascript:selectPosition('" + tvList.get(i).getId() + "','" +
	// tvList.get(i).getName() + "','" + isCan + "')\");");
	// }else{
	// content.append("d.add(" + tvList.get(i).getId() + "," +
	// tvList.get(i).getParentId()+ ",'" + tvList.get(i).getName() + "');");
	// }
	// }
	// content.append("document.write(d);");
	//
	// return content.toString();
	// }

	// public static String selectDepartment(TreeViewElement treeElmt, boolean
	// bHidden,String isCan) {
	// StringBuffer content = new StringBuffer();
	// content.append("<li id=" + treeElmt.getID() + ">");//???li???
	// if (bHidden &&
	// treeElmt.canExpand())//??????????????????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/plus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else if (treeElmt.canExpand())//?????????,?????????????????showHide???
	// content.append("<img src=/wbflow/images/minus.gif onClick=\"showHide('"
	// + treeElmt.getID() + "')\">");
	// else//????????????
	// content.append("<img src=/wbflow/images/blank.gif>");
	// if(treeElmt.getActiveFlag() == Constants.ACTIVEFLAG_YES){
	// content.append("<img src=/wbflow/images/folder.gif><a
	// href=\"javascript:selectPosition('" + treeElmt.getID() + "','" +
	// treeElmt.getNodeName() + "','" + isCan + "')\" ");//??????????
	// }else{
	// content.append("<img src=/wbflow/images/folder1.gif><a href=\"#\"
	// ");//??????????
	// }
	// if (treeElmt.canExpand())//??????????????????showHide???
	// content.append("ondblclick=\"showHide('" + treeElmt.getID() + "')\"");
	// content.append(">" + treeElmt.getNodeName() + "</a>");
	// if (treeElmt.canExpand()) {//???????????????UL??????????
	// content.append("<ul");
	// if (bHidden)
	// content.append(" style=\"display:none;\" ");
	// content.append(">");
	// TreeViewElement[] elmts = treeElmt.getChildren();//???????????
	// for (int i = 0; i < elmts.length; i++)
	// content.append(selectDepartment(elmts[i], bHidden,isCan));//?????????????
	// content.append("</ul>");
	// }
	// content.append("</li>");//???????<li>???
	// return content.toString();
	// }

	// public static String getUser(String path,String flag) {
	// StringBuffer content = new StringBuffer();
	//		
	// content.append("d = new dTree('d');");
	// List<TreeView> tvList = new TreeViewDaoImpl().getAllTreeByParentId(1);
	// for(int i =0 ; i < tvList.size();i++){
	// content.append("d.add(" + tvList.get(i).getId() + "," +
	// tvList.get(i).getParentId()+ ",'" + tvList.get(i).getName() +
	// "',\"javascript:goToMail('" + path + "','" + tvList.get(i).getId() +
	// "','" + flag + "')\");");
	// }
	// content.append("document.write(d);");
	//
	// return content.toString();
	// }

	// ????????????б?
	// public static String getSaleTree(String path,String flag) {
	// StringBuffer content = new StringBuffer();
	//		
	// content.append("d = new dTree('d');");
	// content.append("d.icon.node='/wbflow/menu-img/folder.gif';");
	// List<TreeView> tvList = new TreeViewDaoImpl().getAllTreeByParentId(1);
	// for(int i =0 ; i < tvList.size();i++){
	// // ????
	// //if (tvList.get(i).getNode_protery() != null &&
	// tvList.get(i).getNode_protery() == Constants.ORGN_NODE_SHOP)
	// // ???
	//			
	// if (tvList.get(i).getActiveFlag() == Constants.ACTIVEFLAG_YES)
	// content.append("d.add(" + tvList.get(i).getId() + "," +
	// tvList.get(i).getParentId()+ ",'" + tvList.get(i).getName() +
	// "',\"javascript:setTreatPositionId('" + tvList.get(i).getName() + "','" +
	// tvList.get(i).getId() + "','" + flag + "')\");");
	// // ???if (tvList.get(i).getIsLeader() == Constants.ACTIVEFLAG_YES)
	// //else
	// //content.append("d.add(" + tvList.get(i).getId() + "," +
	// tvList.get(i).getParentId()+ ",'" + tvList.get(i).getName() + "');");
	// }
	// content.append("document.write(d);");
	//
	// return content.toString();
	// }
	// // public static String getUser(TreeViewElement treeElmt, boolean
	// bHidden,String path,String flag) {
	// // StringBuffer content = new StringBuffer();
	// // content.append("<li id=" + treeElmt.getID() + ">");//???li???
	// // if (bHidden &&
	// treeElmt.canExpand())//??????????????????????,?????????????????showHide???
	// // content.append("<img src=/wbflow/images/plus.gif onClick=\"showHide('"
	// // + treeElmt.getID() + "')\">");
	// // else if (treeElmt.canExpand())//?????????,?????????????????showHide???
	// // content.append("<img src=/wbflow/images/minus.gif
	// onClick=\"showHide('"
	// // + treeElmt.getID() + "')\">");
	// // else//????????????
	// // content.append("<img src=/wbflow/images/blank.gif>");
	// // if(treeElmt.getActiveFlag() == Constants.ACTIVEFLAG_NO){
	// // content.append("<img src=/wbflow/images/folder1.gif><a
	// href=\"/wbflow/userAccount.do?dispatch=searchUserByProperty&forward=" +
	// path + "&positionId=" + treeElmt.getID() + "&flag=" + flag + "\"
	// ");//??????????
	// // }else{
	// // content.append("<img src=/wbflow/images/folder.gif><a
	// href=\"/wbflow/userAccount.do?dispatch=searchUserByProperty&forward=" +
	// path + "&departmentId=" + treeElmt.getID() + "&flag=" + flag + " \"
	// ");//??????????
	// // }
	// // if (treeElmt.canExpand())//??????????????????showHide???
	// // content.append("ondblclick=\"showHide('" + treeElmt.getID() + "')\"");
	// // content.append(" target = \"rightFrame\">" + treeElmt.getNodeName() +
	// "</a>");
	// // if (treeElmt.canExpand()) {//???????????????UL??????????
	// // content.append("<ul");
	// // if (bHidden)
	// // content.append(" style=\"display:none;\" ");
	// // content.append(">");
	// // TreeViewElement[] elmts = treeElmt.getChildren();//???????????
	// // for (int i = 0; i < elmts.length; i++)
	// // content.append(getUser(elmts[i], bHidden,path,flag));//?????????????
	// // content.append("</ul>");
	// // }
	// // content.append("</li>");//???????<li>???
	// // return content.toString();
	// // }
	//
	// @SuppressWarnings("unchecked")
	// static public TreeviewElement[] getTopCategory() {
	//
	// try {
	// List<TreeView> nodeList = new ArrayList<TreeView>();
	// nodeList = twDao.findByParentId(1);
	// if (nodeList.size() <= 0) {//??????????
	// return null;//????null
	// }
	// else{//?????????
	// Vector vData = new Vector();
	// for(int i = 0 ;i < nodeList.size();i++){
	// vData.add(""+ nodeList.get(i).getId());
	// }
	// TreeviewElement[] children = new TreeviewElement[vData.size()];
	// for (int i=0;i<vData.size();i++)
	// {
	// int id = Integer.parseInt((String)vData.get(i));
	// children[i] = new TreeView(id);
	// }
	// return children;//????ü????????????
	// }
	// } catch (RuntimeException e) {
	// e.printStackTrace();
	// return null;
	// }finally{
	// HibernateSessionFactory.closeSession();
	// }
	// }
	// static public String renderSimple(TreeviewElement treeElmt) {
	// StringBuffer content = new StringBuffer();
	// content.append("<li id=" + treeElmt.getID() + "><a href=\"#\">");
	// content.append( treeElmt.getNodeName() + "</a>");
	// if (treeElmt.canExpand()) {
	// content.append("<ul>");
	// TreeviewElement[] elmts = treeElmt.getChildren();
	// for (int i = 0; i < elmts.length; i++)
	// content.append(renderSimple(elmts[i]));
	// content.append("</ul>");
	// }
	// content.append("</li>");
	// return content.toString();
	// }
	// static public String renderTreeViewAjax(TreeviewElement treeElmt,boolean
	// bRenderChildren) {
	// StringBuffer content = new StringBuffer();
	// content.append("<li id="+treeElmt.getID()+">");
	// if (treeElmt.canExpand())
	// content.append("<img src=images/plus.gif
	// onClick=\"getSubTree('"+treeElmt.getID()+"')\">");
	// else
	// content.append("<img src=images/blank.gif>");
	// content.append("<img src=images/folder.gif><a href=\"#\"");
	// if (treeElmt.canExpand())
	// content.append(" onClick=\"getSubTree('"+treeElmt.getID()+"')\"");
	// content.append(">"+treeElmt.getNodeName()+"</a>");
	//		
	// if ( bRenderChildren&&treeElmt.canExpand( ))
	// {
	// content.append("<ul>");
	// TreeviewElement[] elmts = treeElmt.getChildren();
	// for (int i=0;i<elmts.length;i++)
	// content.append(renderTreeViewAjax(elmts[i],false));
	// content.append("</ul>");
	// }
	//		
	// content.append("</li>");
	// return content.toString();
	// }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -