extjs4.2 - Pass data between views in ExtJS -
i reading data store , populating main girdview. when of row clicked, windows appear , want fill fieldset in window same record clicked. can tell me how it?
my popup window like:
{ extend: 'ext.window.window', height: 500, width: 1500, minwidth :1500, maxwidth :1500, layout: 'fit', controller: 'popupwindowcontroller', initcomponent: function () { var me = this; //console.log(me.myextraparams); var store = ext.getstore('mainstore'); ext.applyif(me, { /* items: [{ xtype: 'form', bodypadding: 10, region: 'center' }]*/ }); me.callparent(arguments); }, items: [ { xtype: 'panel', title : 'projektierung', bodystyle : 'padding:5px', width : 1880, autoheight : true, items: [ { xtype : 'kopfdatenview', // have populate view } ] }]}
and in main view calling as:
{ region: 'center', xtype: 'gridpanel',
listeners : { itemdblclick: function(dv, record, item, index, e) { var = record.data; win = ext.create('app.view.popupwindow'); console.log(win.myextraparams); win.on('show', function(win) { win.settitle(record.get('id')); }); win.show(); } }, columns: [ **** ], store: 'mainstore', height: 100, width: 400, }
i want populate fieldset in kopfdatenview. kindly
you directly pass record window on creation :
win = ext.create('app.view.popupwindow', { myrecord: record });
and inside window's initcomponent
function (before callparent
) :
this.title = this.myrecord.get('id');
Comments
Post a Comment