-
13 Sep 2012 12:05 AM #1
Answered: how to do dynamic items: [ ]
Answered: how to do dynamic items: [ ]
my view class looks something like this
i would like to do this in a such. so that i do not have to manually put html: 'part #' one by one. is this possible?Code:Ext.define('tmp.view.Myclass, { extends: 'Ext.Panel', config: { items: [ { html: 'part 1', }, { html: 'part 2', }, ] } });
-
Best Answer Posted by hadukiCode:
{ config:{//....}, initialize: function() { var me = this,i; me.callParent(); for(i=0;i<2;i++){ me.add({ html: 'part '+i }); } } }
-
13 Sep 2012 1:03 AM #2
Code:{ config:{//....}, initialize: function() { var me = this,i; me.callParent(); for(i=0;i<2;i++){ me.add({ html: 'part '+i }); } } }
-
13 Sep 2012 1:16 AM #3


Reply With Quote