Ext.Window 里面如何加载一个带有grid的 tabpanel?
展开全部
�0�2部分代码如下:
jsp: �0�2
Js代码�0�2:�0�2var ds_tab=new Ext.data.JsonStore({ url:'tjhz_tabsCx.action', root:'list', totalProperty:'totalsize', fields:['nsrlsh','nsrmc','sgy','sws'] }); Ext.onReady(function(){ var grid_tab= new Ext.grid.GridPanel({ //region:'center', title:'税务清结电子申报情况详细情况', iconCls:'zoomIcon', border: false, //layout:'fit', //stripeRows:true, viewConfig: { forceFit: true }, loadMask:{msg:'正在查询数据,请稍候......'}, ds:ds_tab, cm:[ {header:'纳税人号',dataIndex:'nsrlsh',width:100,align:'right'}, {header:'纳税人名称',dataIndex:'nsrmc',width:100,align:'right'}, {header:'税管员',dataIndex:'sgy',width:100,align:'right'}, {header:'税务所',dataIndex:'sws',width:100,align:'right'} ] }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); qyqdWin.show(); }); �0�2�0�2�0�2 运行后出现如下错误:�0�2�0�2�0�2�0�2�0�2�0�2�0�2
�0�2 求高手解决:ext.window 下 tabpanel�0�2 中无法加载 grid 的问题。。。。。
jsp: �0�2
Js代码�0�2:�0�2var ds_tab=new Ext.data.JsonStore({ url:'tjhz_tabsCx.action', root:'list', totalProperty:'totalsize', fields:['nsrlsh','nsrmc','sgy','sws'] }); Ext.onReady(function(){ var grid_tab= new Ext.grid.GridPanel({ //region:'center', title:'税务清结电子申报情况详细情况', iconCls:'zoomIcon', border: false, //layout:'fit', //stripeRows:true, viewConfig: { forceFit: true }, loadMask:{msg:'正在查询数据,请稍候......'}, ds:ds_tab, cm:[ {header:'纳税人号',dataIndex:'nsrlsh',width:100,align:'right'}, {header:'纳税人名称',dataIndex:'nsrmc',width:100,align:'right'}, {header:'税管员',dataIndex:'sgy',width:100,align:'right'}, {header:'税务所',dataIndex:'sws',width:100,align:'right'} ] }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); //纳税人详细列表tab var tabs = new Ext.TabPanel({ activeTab: 2, region:'center', layoutOnTabChange :false, //deferredRender:false, items:[ { title: '已导入纳税人', layout: 'fit', id:'0', border: false, autoScroll : true , // html:'0000', contentEl:'tab0' // items:[ grid_tab] }, { title: '已导入汇算户', layout: 'fit', id:'1', border: false, autoScroll : true, // html:'22222', contentEl:'tab1' // items:[grid_tab] },{ title: '未导入纳税人', layout: 'fit', id:'2', border: false, autoScroll : true, // html:'22222', contentEl:'tab2', items:[grid_tab] },{ title: '未导入汇算户', layout: 'fit', id:'3', border: false, autoScroll : true, //html:'33333', contentEl:'tab3' // items:[ ] }] }); var cancelBtn=new Ext.Button({ text:'返回', iconCls:'gobackIcon', handler: function(){ qyqdWin.hide(); } }); //纳税人详细列表 window var qyqdWin=new Ext.Window({ title:'税务清结电子申报数据导入明细情况查询', width:600, height:450, region:'center', //layout:'fit', iconCls:'zoomIcon', contentEl:'tab', modal:true, resizable:false, closeAction:'hide', items:[tabs], buttons:[ cancelBtn ], listeners:{ 'beforeshow': function(){ if(tabs.activeTab.id==2){ }else{ tabs.setActiveTab(2); } } } }); qyqdWin.show(); }); �0�2�0�2�0�2 运行后出现如下错误:�0�2�0�2�0�2�0�2�0�2�0�2�0�2
�0�2 求高手解决:ext.window 下 tabpanel�0�2 中无法加载 grid 的问题。。。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询