PDA

View Full Version : Extjs migration issue from 2.3 to 3.3(this.el is null)



smruti_patra
28 Oct 2010, 6:10 AM
Hi,
I am getting some error while doing the migration from Extjs2.3 to Extjs3.3.

I have difined one div in my php.


<!-- used in 'north' panel of main layout -->
<div id="masthead" class="x-hidden">
<?=$masthead?>
</div>


I am using this div in the one js like el: 'masthead' file in below code.


var viewport = new Ext.Viewport({
layout: 'border',
items:[{
xtype: 'box',
region: 'north',
autoShow: true,
el: 'masthead'
},{
region: 'center',
xtype: 'grid',
id: 'existingPerfs',
loadMask: true,
enableHdMenu: false,
enableColumnMove: false,
enableColumnHide: false,
autoExpandColumn: 5,
store: store,
cm: colModel,
sm: new Ext.grid.RowSelectionModel({selectrow:Ext.emptyFn}),
plugins: [gridSearch],
tbar: tbar,
bbar: pager,
listeners: {
render: function(grid){
if (latx_query)
{
gridSearch.field.setValue(latx_query);
}
var pressed = Ext.getCmp('existing-details-btn').pressed;
var view = grid.getView();
view.showPreview = pressed;
view.refresh();
}
},
viewConfig: {
forceFit: false,
emptyText: 'No perfstats found',
deferEmptyText: true,
enableRowBody: true,
showPreview: false,
getRowClass: function(record, rowIndex, p, store){
if (this.showPreview){
alert("test");
p.body = '<p style="padding-left:1em; color:#797979;">'+record.data.filers+'</p><br />';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
}
}]
});

This


This above code is working as expected in extjs 2.3 but in 3.3 it is giving error like :
this.el is null
[Break on this error] ct.dom.insertBefore(this.el.dom, position);

when i am commenting el: el: 'masthead' in forst item it is working fine.

could you please let me what might be the problem?

Thanks,
-smruti

mike1993
28 Oct 2010, 8:17 AM
http://www.sencha.com/forum/showthread.php?113047-Major-issue-on-migrating-to-EXTJS-3.3&highlight=Viewport+contentEl