0
Отправить записанные данные в другую сетку в ExtJS
Ext.define('AM.controller.Users', {
\t extend: 'Ext.app.Controller',
\t init: function() {
\t \t this.control({
\t \t \t 'userlist': {
\t render: function() {
\t \t console.log('inside render event');
\t },
\t itemdblclick: this.onDbClickonGridRow
\t \t
\t },
\t 'newTable': {
\t render: function() {
\t \t console.log('inside table event');
\t },
\t // itemdblclick: this.onDbClickonGridRow
\t \t
\t }
\t \t })
\t },
\t onDbClickonGridRow: function(event, e, eOpts) {
\t \t console.log(e.data);
\t \t var uForm = Ext.create('widget.newTable');
\t \t console.log(uForm);
\t \t uForm.loadRecord(e);//error here
\t }
});
This is my controller of the application
Ext.define('AM.view.List' ,{
extend: 'Ext.grid.Panel',
alias: 'widget.userlist',
title: 'All Users',
initComponent: function() {
\t this.title= 'Modified title';
this.store = {
fields: ['name', 'email'],
data : [
{name: 'avi', email: '[email protected]'},
{name: 'abhi', email: '[email protected]'},{name: 'Nikhil', email: '[email protected]'},
{name: 'manu', email: '[email protected]'}
]
};
this.columns = [
{header: 'Name', dataIndex: 'name', flex: 1},
{header: 'Email', dataIndex: 'email', flex: 1}
];
this.callParent(arguments);
}
});
This is userList.js
Это оригинальная панель, из которой я хотел бы передать мои данные на двойное нажатие строки таблица к newTable.js
var newTable=Ext.define('AM.view.newTable' ,{
extend: 'Ext.grid.Panel',
alias: 'widget.newTable',
title: 'All Users',
initComponent: function() {
this.title= 'New title';
this.store = {
fields: ['name', 'email'],
};
this.columns = [
{header: 'Name', dataIndex: 'name', flex: 1},
{header: 'Email', dataIndex: 'email', flex: 1}
];
this.callParent(arguments);
}
});
Это newTable.js, в который я хотел бы вставить свои данные.
Проблема здесь состоит в том, что я могу собрать данные через e.data, но не знаю, как я могу разместить его в newTable.js от uform