<script type="text/javascript">
var dataArr='[{id:"base",text:"Base",children:[{id:"ajax",text:"Ajax",pid:"base"},{id:"json",text:"JSON",pid:"base"},{id:"date",text:"Date",pid:"base",checked:true},{id:"control",text:"Control",pid:"base"},{id:"forms",text:"Forms",pid:"base",children:[{id:"button",text:"Button",pid:"forms"},{id:"listbox",text:"ListBox",pid:"forms"},{id:"checkboxlist",text:"CheckBoxList",pid:"forms"}]}]},{id:"lists",text:"Lists",children:[{id:"datagrid",text:"DataGrid",pid:"lists"},{id:"tree",text:"Tree",pid:"lists"},{id:"treegrid",text:"TreeGrid",pid:"lists"}]},{id:"layouts",text:"Layouts",children:[{id:"panel",text:"anel",pid:"layouts"},{id:"splitter",text:"Splitter",pid:"layouts"},{id:"layout",text:"Layout ",pid:"layouts"}]},{id:"navigations",text:"Navigations",children:[{id:"toolbar",text:"Toolbar",pid:"navigations"},{id:"tabs",text:"Tabs",pid:"navigations"},{id:"outlookbar",text:"OutlookBar",pid:"navigations"},{id:"menu",text:"Menu",pid:"navigations"},{id:"pager",text:"ager",pid:"navigations"}]},{id:"other",text:"Other",isLeaf:false,asyncLoad:false}]';
function createManyTreeSelect(){
var str = '';
for (var i = 0; i < 200; i++) {
str+="<input id=\"select"+i+"\" class=\"mini-treeselect\" multiSelect=\"true\"\n" +
" textField=\"text\" valueField=\"id\" parentField=\"pid\" checkRecursive=\"false\"\n" +
" showFolderCheckBox=\"true\" expandOnLoad=\"true\" showClose=\"true\" oncloseclick=\"onCloseClick\"\n" +
" popupWidth=\"200\"/>"
}
$('#contentArea').append(str);
var start= new Date();
mini.parse();
var end = new Date();
console.log(end-start);
for (var i = 0; i < 200; i++) {
var myTree = mini.get('select'+i);
myTree.set({
data.extend(true, [], eval(dataArr)),
valueField:'id',
parentField:'pid'
});
}
}
function clearAllTreeSelect(){
$('#contentArea').empty();
}