PDA

View Full Version : why my initialize is no fire



mylok
30 Apr 2014, 6:20 AM
I follow some sample code from google and wonder why initialize method is not fire(extjs 4.21). Can someone help?
below is my code:

Ext.define('Ext4Example.view.stock.StockPanel', { extend: 'Ext.form.Panel', alias: 'widget.stockpanel', config: { height: 455, id: 'FoodPanel', layout: { type: 'vbox' }, scrollable: 'vertical', items: [ { xtype: 'panel', height: 47, id: 'rowTitle', layout: { type: 'hbox' } } ] }, initialize: function () { console.log('gg'); }});

jsakalos
30 Apr 2014, 7:21 AM
There is no initialize function on components. You are probably looking for initComponent.