当前位置: 代码迷 >> Web前端 >> ext combox 上拉树
  详细解决方案

ext combox 上拉树

热度:658   发布时间:2012-11-08 08:48:11.0
ext combox 下拉树

一个下拉树的简单实现,ext2.2

var comboxWithTree = new Ext.form.ComboBox({  
	hiddenName:'consCode',fieldLabel:'建设单位',
    displayField:'code',valueField:'value',mode:'local',
    store:new Ext.data.SimpleStore({fields:[],data:[[]]}),   
    editable:false,   
    shadow:false,   
    triggerAction:'all',   
    maxHeight: 200,   
    tpl:"<div style='height:200px'><div id='tree1'></div></div>",   
    selectedClass:'',   
    onSelect:Ext.emptyFn   
  });   
 var tree1 = new Ext.tree.TreePanel({
		    border : false,
		    rootVisible : false,
			root : new Ext.tree.AsyncTreeNode(),
			loader : new Ext.tree.TreeLoader({
				dataUrl : contextPath+'/build/company.ext?pmethod=getConstructTree'
			})
		});
   tree1.on('click',function(node){   
        
   });   
  comboxWithTree.on('expand',function(){   
    tree1.render('tree1');   
   });   

?