jsp导入插件:
<script type="text/javascript" src="<%=request.getContextPath()%>/extjs/TreeCellEditing.js"></script>
插件下载地址:http://pan.baidu.com/share/link?shareid=549799148&uk=2368039448
tree pannel代码:
var tree = Ext.create('Ext.tree.Panel', { title: '动态加载节点的树', // 不使用Vista风格的箭头代表节点的展开/折叠状态 useArrows: false, width: 800, height: 550, store: treeStore, // 指定该树所使用的TreeStore rootVisible: false, // 指定根节点不可见 multiSelect:true, viewConfig: { plugins: { ptype: 'treeviewdragdrop', } },//这个是拽拉的插件,可以不用理会 columns:[ { xtype:'treecolumn', text:'text', writh:250, dataIndex:'text', field: 'textfield' },{ text:'info', dataIndex:'id', field: 'textfield' },{ text:'info', dataIndex:'desc', field: 'textfield' } ], selType: 'cellmodel', plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 2, listeners: { 'beforeedit':function(editor,e,eOpts ){ Ext.MessageBox.alert("hello word",e.record.id); } } }) ], renderTo: Ext.getBody() });