PDA

View Full Version : Strange Problem with switch between Tabs in TabPanel



psmacarov
29 Jun 2010, 9:12 PM
I have this code


Application.charts_tabs = Ext.extend(Ext.TabPanel, {
border:true,
id: 'main-tabs'
,initComponent:function() {
Ext.apply(this, {
bbar: [combo_sv,'-','week:',sv_wk1,'on: ',sv_wk2,'-',sv_but],
height: 300,
width: 600,
activeTab: 0,
items: [
{
title: '???????? ? ????????',
id: '1',
items:[
{
xtype: 'columnchart',
id: 'chart1',
store: ch_store_1,
url: './ext/resources/charts.swf',
xField: 'out_grp',
yField: 'per_GR',
yAxis: new Ext.chart.NumericAxis({
maximum: 20,
minimum: 0
}),
extraStyle: {
xAxis: {
labelRotation: -90
}
}
}]
},
{
title: '??????????',
id: '2',
items:[
{
xtype: 'columnchart',
id: 'chart2',
store: ch_store_2,
url: './ext/resources/charts.swf',
xField: 'out_grp',
yField: 'all_osem',
yAxis: new Ext.chart.NumericAxis({
// displayName: '?????????? ???????????'
maximum: 400,
minimum: 0
// labelRenderer : Ext.util.Format.numberRenderer('0,0')
}),
extraStyle: {
xAxis: {
labelRotation: -90
}
}
}]
}
.................
});

Application.charts_tabs.superclass.initComponent.apply(this, arguments);
}

,onRender:function() {


Application.charts_tabs.superclass.onRender.apply(this, arguments);
}
});

Ext.reg('charts_tabs', Application.charts_tabs);


I put it in my viewport


title: '???????',
xtype: 'portal',
listeners: {
activate : {
fn: function() {
js.include("charts_tabs");
js.module("charts_tabs");
if (Ext.getCmp('charts').items.length == 0)
{

Ext.getCmp('charts').items.add(new Application.charts_tabs({id : 'df'}));
Ext.getCmp('charts').layout.layout();
}

}
},
deactivate :
{
fn: function() {

}
}
},
iconCls: 'rep',
layout: 'fit',
style: 'padding: 10px;',
items: [
{
border: false,
id: 'charts',
xtype: 'panel',
html: '',
layout: 'fit',
items: []
}

]

}

I try it in my Computer (Firefox) everything is ok, but when it run on one of other computer (Firefox) i have strange problems. switching between tabs take a lot of time, about 10-20 sec. I can't uderstand why. On 10 computers everything ok, on other everything bad((
I am novice, may be i do something wrong? If u have any ideas, may be need 2 improve my code please help. it is very very imporatant for me.