PDA

View Full Version : extjs 2.2 to 4.0 migration



raiwinashu
2 Jul 2012, 4:27 AM
Hi,
Im trying to migrate my app to ext 4 version. This is my piece of code



Ext.namespace('Ext.hpm');

Ext.onReady(function() {
var content = Ext.getCmp('contentPanelId');
Ext.QuickTips.init();

var user_gridpnl = new Ext.grid.Panel({
store: user_store,
columns: [------],
tbar: tbar,
sm: sm,
stripeRows: true,
height: 400,
bbar: manageusr_pagingBar,
title: 'Manage Users'
});

content.add(user_gridpnl);
content.doLayout();
});


Issue:Im getting item is null in the ext-all-debug.js in firebug error console. while debugging i found that error is due to content.add(user_gridpnl);

where content=Ext.getCmp('contentPanelId');

contentpanel is defined in my master page.code is


var contentPanel = new Ext.panel.Panel({
id: 'contentPanelId',
region: 'center',
layout: 'fit',
margins: '0 0 0 0',
split: false,
contentEl: 'contentDiv'
});

This code is in master page

Please someone help me with the issue

Thanx in advance
Ashwin

arthurakay
2 Jul 2012, 7:24 AM
For starters, your "user_gridpnl" is defining toolbars and other properties with objects that don't appear to be defined... unless you have just simplified the code for sake of example.

My suggestion would be to make sure that each of your pieces render correctly in isolation first - that will help to identify any problems and narrow-down our focus area.