0
我有两个网格的小部件。在模态窗口内加载网格
当选中第一个网格的一行时,根据请求发送的id_note加载第二个网格 。
如果网格是,例如,在一个布局hbox,它运作良好。
但是,当第二个网格位于模式窗口内时,存储装载失败。
什么是我的代码失败?
(...)
},{
xtype: 'actioncolumn',
text:'Notes',
minWidth: 40,
flex:0.30,
align:'center',
items: [{
icon: 'resources/images/loadWin.png',
tooltip: 'show window',
handler: function(grid, record, item, index, e, eOpts){
var selectRow = grid.getSelectionModel().select(record);
var selection = grid.getSelectionModel().getLastSelected(record);
var id_note= selection.get('id_note');
var win = Ext.widget('popupWindow', {
animateTarget : item,
}).show();
var grid = Ext.ComponentQuery.query('#gridItemId')[0]; //grid within win
var store = grid.getStore();
store.proxy.extraParams = {
'id_note': id_note
},
//Right up to this point
store.load(); //**PROBLEM HERE**
}
}
(...)
没有足够的细节。商店如何加载失败?你看到了什么?它是否打电话给服务器?是否有错误讯息?你使用的是什么Ext JS版本? – Greendrake
我正在使用EXTJS 5.1。 store.load生成一个错误;未捕获错误:无法修改ext-store-empty。关于请求:成功:{success:true},总数:“4”,但商店rootProperty返回null。奇怪的是,如果网格是在一个布局hbox中,它运作良好。只是如果第二个网格在窗口内不加载。感谢德雷克。 – josei
窗口内的网格是否有唯一的'itemId'?你确定'Ext.ComponentQuery.query('#gridItemId')[0]'返回窗口内的网格而不是其他任何网格吗? – Greendrake