PDA

View Full Version : problem in extending Cardlayout in ext 3.1



vicy
11 Feb 2010, 3:24 AM
Hi,
I am using following code to to create card layout in our project but it is giving following error
"ct.items is undefined" in ext 3.1 , it is working fine in ext 2.2.1


createCardPanelEnclosure();


MainPanel = new Ext.Panel({
layout: 'border',
id: 'main_panel',
preventBodyReset: true,
renderTo: 'vehicleDataCardPanel',
title :'Main',
height: Ext.isIE ? 664 : 664,
frame: true,
margins: '5px 5px 5px 5px',
items: [{
region: 'center',
items: new Display()
}],
hiliteButtons:function(selected) {
}

}

);


function createCardPanelEnclosure() {


?
Display = new Ext.extend(Ext.layout.CardLayout, {
layout: 'card',
id: 'vehicle_panels_layout_id',
border: false,
bodyStyle: 'padding:5px',
activeItem: 0,
items:[


new Ext.Panel({renderTo: 'vehicleDataCardPanelRender', title:'list',preventBodyReset: true,})
, new Ext.Panel({renderTo: 'vehicleDataCardPanelRender', title:'detail'})
]


});
Ext.reg('vehicles_panel_layout', Display);

return Display;
}