梅花树的动态加载和同一父结点的子结点的交换位置.??
我用的是梅花雪大侠的MzTreeView 1.0 ,我是用jsp实现的,但怎么都显示不出一棵树来.,请问怎么实现梅花树的动态加载和同一父结点的子结点的交换位置.??
最好有代码?? 我的邮箱是dmh0203@163.com
我的代码如下:
页面代码:
<%@ page contentType= "text/html; charset=GBK " %>
<%@ page import= "tree.Treeview "%>
<%@ page import= "java.util.* "%>
<head>
</head>
<body>
<script language= "JavaScript " src= "d:/MzTreeView10/MzTreeView10.js "> </script>
<style>
A.MzTreeview
{
font-size: 9pt;
padding-left: 3px;
}
</style>
<script language= "JavaScript ">
var tree = new MzTreeView( "tree ");
tree.icons[ "property "] = "property.gif ";
tree.icons[ "css "] = "collection.gif ";
tree.icons[ "book "] = "book.gif ";
tree.iconsExpand[ "book "] = "bookopen.gif "; //展开时对应的图片
tree.setIconPath( "d://MzTreeView10// "); //可用相对路径
<%
Treeview treeview=new Treeview();
String node=treeview.getResultSet();
out.write(node);
%>
document.write(tree.toString());
</script>
</body>
</html>
bean的代码:
package tree;
import java.sql.*;
import java.util.*;
public class Treeview
{
Connection con=null;
Statement stmt=null;
ResultSet rs=null;
String url= "jdbc:mysql://localhost:3310/example?user=root&password=123 ";
public Treeview()
{
try
{
Class.forName( "org.gjt.mm.mysql.Driver ");
con=DriverManager.getConnection(url);
}catch(Exception e)