<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="../assets/header-all.jsp"%>
<%-- <script type="text/javascript" src="<%=basePath%>/dwr/interface/VpUserRoleService.js"></script>  --%>
<script type="text/javascript">
var selectTree;
$(function(){
/* 	VpUserRoleService.select_VpUserRole({},function(data){
		selectTree = $('#eqparea_combox').combotree({
		        checkbox:false,
		    	border:false,
		    	parentField:"fatherId",
		    	textFiled:"roleName",
		    	idFiled:"roleId",
		    	panelWidth:"200",
		    	data:data,
				onLoadSuccess:function(node,data){
					$('#eqparea_combox').combotree("setValue",data[0].roleId).combotree("setText", data[0].roleName);
				}
		});
	});  */
	$.ajax({
		url:'comboTree.json',
		type:'get',
		dataType:'json',
		success:function(data){
			selectTree = $('#eqparea_combox').combotree({
		        checkbox:false,
		    	border:false,
		    	parentField:"sjxzbh",
				textFiled:"xzmc",
				idFiled:"xzbh",
		    	panelWidth:"200",
		    	data:data,
				onLoadSuccess:function(node,data){
					$('#eqparea_combox').combotree("setValue",data[0].xzbh).combotree("setText", data[0].xzmc);
				}
			});
		}
	})
 
});

function getVal(){
	selectTree && alert("获取到的树节点ID为: "+selectTree.combotree('getValue'));
}
</script>
</head>
<body class="easyui-layout">
    <div class="fl">
		<input id="eqparea_combox"/>  <input type="button" id="test1" onclick='getVal()' value="获取树的值"/> 
	</div>
<body>
