Hi,
Take the following test scenario:
Code:
Ext.onReady(function() {
Ext.create('Ext.app.Application', {
name : 'app',
appFolder : 'app',
autoCreateViewport : false,
launch : function() {
var vP = Ext.create('Ext.container.Viewport', {
layout: {
type: 'border'
},
items: [{
html: 'My App',
region: 'center'
}]
});
var panel = Ext.create("Ext.form.Panel", {
style: {
backgroundColor: "#00FFFF"
},
layout: {
type: 'vbox'
},
region: 'east',
width: 800,
initComponent: function(){
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'textfield',
name: 'name',
fieldLabel: 'Name',
allowBlank: false,
flex: 0,
margins: ''
}
],
dockedItems: [
]
})
me.callParent(arguments);
}
});
vP.add(panel);
}
});
});
All it does, it creates a ViewPort, than creates an Ext.form.Panel, and adds that to the viewport. The problem is, that the code fails in Ext.layout.ContextItem in method init, at the following line:
Code:
me.hasRawContent = !(target.isContainer && target.items.items.length > 0);
The reason of the failure is, that the target.items property is an Array, so it has no further items property (it's basically undefined).
Am I doing something wrong, or it's a bug?
Also if in the initComponent method of the panel being created I comment out the dockedItems config, I get another error, which comes from Ext.layout.component.Dock:getDockedItems, at this line:
Code:
all = renderedOnly ? Ext.ComponentQuery.query('[rendered]', me.owner.dockedItems.items) : me.owner.dockedItems.items,
me.owner.dockedItems is undefined.
Question again, if I do something totally bad, or is it a bug also?
Thanks for Ur reply in advance!