日期:2014-05-17 浏览次数:20838 次
Ext.define('knowlTreeModel',{ extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'string' },{ name: 'text', type: 'string' }] }); var knowlTreeStore = Ext.create('Ext.data.TreeStore',{ model: 'knowlTreeModel', proxy: { type: 'ajax', url: 'knowlPoint.do?method=trunkTree' }, reader: { type: 'json' }, root: { id: 'rootNode', text: '根节点', expanded: false } }); var knowlTreePanel = Ext.create('Ext.tree.Panel',{ width: 300, height: 450, store: knowlTreeStore, rootVisible: true, renderTo: 'knowlTreeDiv', autoScroll: true }); knowlTreePanel.store.load();