PDA

View Full Version : Problem with Tabpanel



Ourysso
9 Feb 2011, 2:05 AM
Hi everyone!
I'm having a problem with a tabpanel.
Here is the code:


var painel = new Ext.TabPanel({
x: 10,
y: 150,
id: 'aba_evento_participantes',
anchor: '-150px',
height: 408,
border: true,
activeTab: 0,
items:[{
title: 'Participantes',
xtype: 'panel',
items: [grid_eventos]
}]
});


I'm trying to create a second tabpanel but in IE8 doesn't work.
This is the error:

Mensagem: 'events' é nulo ou não é um objeto
Linha: 7
Caractere: 163909
Código: 0
URI: http://localhost/public/lib/ext-3.3.1/ext-all.js


Someone have any idea?
Thanks for the help

MrSparks
9 Feb 2011, 2:27 AM
The code looks fine. Its probably a trailing comma in [grid_eventos]

You can isolate the section of the code like this.



var painel = new Ext.TabPanel({
x: 10,
y: 150,
id: 'aba_evento_participantes',
anchor: '-150px',
height: 408,
border: true,
activeTab: 0,
items:[{
title: 'Participantes',
xtype: 'panel'//,
//items: [grid_eventos]
}]
});


If the error goes away, you know that the problem is located in [grid_eventos]

You can locate, trailing comma either visually or by running the code through jslint www.jslint.com

Typically the rule is, if the code works in Firefox and Chrome but gives an error like you are getting in IE its a trailing comma issue.

Ourysso
9 Feb 2011, 2:35 AM
The code is working but the tabpanel doesn't.
What I'm trying to do is show a tabpanel in a window on EXTJS.

MrSparks
9 Feb 2011, 3:00 AM
The code is working but the tabpanel doesn't.
What I'm trying to do is show a tabpanel in a window on EXTJS.

Does the TabPanel Work in another browser like Firefox?

Ourysso
9 Feb 2011, 3:03 AM
Yes, the tabpanel works in other browsers.
When I try to open the window with the tabPanel inside occurs this error:


Mensagem: 'events' is null or not an object
Linha: 7
Caractere: 163909
Código: 0
URI: http://localhost/public/lib/ext-3.3.1/ext-all.js

MrSparks
9 Feb 2011, 3:07 AM
Yes, the tabpanel works in other browsers.
When I try to open the window with the tabPanel inside occurs this error:


Mensagem: 'events' is null or not an object
Linha: 7
Caractere: 163909
Código: 0
URI: http://localhost/public/lib/ext-3.3.1/ext-all.js

Typically the rule is, if the code works in Firefox and Chrome but gives an error like you are getting in IE its a trailing comma issue.

Please see my first reply on how to find and fix the issue.

fabio.parra
9 Feb 2011, 3:47 AM
'events' is null or not an object sometimes means that you forgot the "new" keyword in some object.