Endolino
23 Nov 2011, 1:30 AM
Dear Users,
i work since 4 days with ExtJS4. Actually i work for a project to migrate ExtJS 2.3 Programming to 4. But i couldnt understand basic functionality. Example:
I define a class "DynamicPanel" with an alias, so that i can take of the advantages of xtype. So clear. I readed taht i have to implement the function initComponent if the extended class inherit from Ext.Component. Okay, Ext.panel.Panel inherit from Ext.Component, so i do it.
But the last Object in the itemArray doesnt work for me.
I got a error message: "Uncaught TypeError: Cannot call method 'substring' of undefined" in Chrome
and "namespace is undefined" in Firebug.
Please help me. I did not understand what basic functionality of ExtJS4? :-/
Ext.onReady(function() {
Ext.define('DynamicPanel', {
extend: 'Ext.panel.Panel',
alias:'dynpanel',
initComponent: function() {
this.callParent();
}
});
Ext.create('DynamicPanel');
var dashboardViewport = Ext.create('Ext.container.Viewport', {
layout: 'border',
cls: 'x-portal-viewport',
margins: '0 0 0 0',
cmargins: '0 0 0 0',
items: [
{
region: 'north',
cls: 'x-dashboard-header',
html: 'Test Eintrag',
height: 37,
border: true,
margins: '5 0 5 0'
},
Ext.create('DynamicPanel',{
id:'panel1',
html:'DynamicPanel',
region:'east'
})
,
{
id: 'portal',
region: 'west',
xtype: 'dynpanel'
}
]
});
});
i work since 4 days with ExtJS4. Actually i work for a project to migrate ExtJS 2.3 Programming to 4. But i couldnt understand basic functionality. Example:
I define a class "DynamicPanel" with an alias, so that i can take of the advantages of xtype. So clear. I readed taht i have to implement the function initComponent if the extended class inherit from Ext.Component. Okay, Ext.panel.Panel inherit from Ext.Component, so i do it.
But the last Object in the itemArray doesnt work for me.
I got a error message: "Uncaught TypeError: Cannot call method 'substring' of undefined" in Chrome
and "namespace is undefined" in Firebug.
Please help me. I did not understand what basic functionality of ExtJS4? :-/
Ext.onReady(function() {
Ext.define('DynamicPanel', {
extend: 'Ext.panel.Panel',
alias:'dynpanel',
initComponent: function() {
this.callParent();
}
});
Ext.create('DynamicPanel');
var dashboardViewport = Ext.create('Ext.container.Viewport', {
layout: 'border',
cls: 'x-portal-viewport',
margins: '0 0 0 0',
cmargins: '0 0 0 0',
items: [
{
region: 'north',
cls: 'x-dashboard-header',
html: 'Test Eintrag',
height: 37,
border: true,
margins: '5 0 5 0'
},
Ext.create('DynamicPanel',{
id:'panel1',
html:'DynamicPanel',
region:'east'
})
,
{
id: 'portal',
region: 'west',
xtype: 'dynpanel'
}
]
});
});