特定のセルがクリックされたときにポップアップでユーザーに関する値を表示するウィンドウがあります.. UserController で、ID に基づいてユーザーの json をロードします。この json の特定の値をウィンドウに渡す方法はありますか? フォームの場合は .getForm().setValues() を使用できることはわかっています。ウィンドウ内にフォームを入れ子にすることはできますか?
コントローラーのスニペット:
loadUserDetails: function(userId) {
var view = Ext.widget('userdetails').show();
Ext.Ajax.request({
url: /user/get.htm?alt=json',
params: { id: userId },
success: function(response) {
var json = Ext.JSON.decode(response.responseText);
}
});
}
スニペットを表示 (ウィンドウ):
Ext.define('App.view.user.UserDetails', {
extend: 'Ext.window.Window'
,alias: 'widget.userdetails'
,id: 'userdetails'
,title: 'User Details'
,height: 300
,width: 380
,initComponent: function() {
var me = this;
this.items = [{
xtype: 'fieldset',
title: 'Information',
margin: '5',
width: 350,
height: 250,
defaults: {xtype: 'displayfield', margin: '3', labelWidth: 100, width: 300},
items: [{
id: 'id',
width: 150,
fieldLabel: 'User Id'
},{
id: 'email',
width: 250,
fieldLabel: 'User Email'
}]
}];
this.callParent(arguments);
}
});