目录结构
话不多说直接上代码
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="common/head.jsp" %>
<title>Insert title here</title>
<script>
$(function() {
$("#funcTree").tree({
url: ctx+"/moduleServlet",
onDblClick:function(node) {
$("#funTab").tabs("add", {
title:node.text,
content:'Tab Body',
closable:true,
tools:[{
iconCls:'icon-mini-refresh',
handler:function(){
alert('refresh');
}
}]
})
}
});
});
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north'" style="height:50px"></div>
<div data-options="region:'south',split:true" style="height:50px;"></div>
<div data-options="region:'west',split:true" title="West" style="width:230px;">
<ul id="funcTree" class="easyui-tree"></ul>
</div>
<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'" style="border:0px;">
<div id="funTab" class="easyui-tabs" style="width:100%;height:100%">
<div title="Tab1" style="padding:10px;display:none;">
<table class="easyui-datagrid"
data-options="url:'${ctx}/data/datagrid_data1.json',method:'get',border:true,singleSelect:true,fit:true,fitColumns:true">
<thead>
<tr>
<th data-options="field:'itemid'" width="80">Item ID</th>
<th data-options="field:'productid'" width="100">Product ID</th>
<th data-options="field:'listprice',align:'right'" width="80">List Price</th>
<th data-options="field:'unitcost',align:'right'" width="80">Unit Cost</th>
<th data-options="field:'attr1'" width="150">Attribute</th>
<th data-options="field:'status',align:'center'" width="40">Status</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</body>
</html>