I want to create a dockedItem toolbar after the panel has been created:
Ext.onReady(function() {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'center',
xtype: 'panel',
listeners: {
afterrender: function(panel) {
//Below gives: Uncaught TypeError: Object #<Object> has no method 'getItemId'
panel.dockedItems.add({
xtype: 'toolbar',
dock: 'bottom',
items: [{
text: 'adfsadf'
}]
});
}
}
}, {
region: 'west',
title: 'west',
html: 'west',
width: 120
}, {
region: 'east',
title: 'east',
html: 'east',
width: 120
}, {
region: 'north',
html: 'north',
title: 'north',
height: 60
}, {
region: 'south',
html: 'south',
title: 'south',
height: 60
}]
});
});
The error is:
Uncaught TypeError: Object #<Object> has no method 'getItemId'
Any ideas on how to do this?
Never mind... was simpler than I thought.
Solution:
panel.addDocked({ ... });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With