我有一个弹出窗口,有一些xtypes,一个xtype是一个网格,有一个商店,但我没有看到它调用任何ajax调用.有人能告诉我我错过了什么吗?
Ext.define('myApp.view.myPopup' {...
....
{
xtype: 'grid',
store: 'MyStore',
iconCls: 'x-fa fa-users',
height : 450,
columns: [{
header...
...}
商店
Ext.define('myApp.store.MyStore', {
extend: 'Ext.data.Store',
model: 'myApp.model.modelA',
pageSize: 100,
remoteSort: true,
autoload : true,
proxy: {
type: 'ajax',
url : 'getStatusId',
reader: {
type: 'json',
root: 'rows',
successproperty: 'status',
totalProperty: 'records'
}
},
listeners : {
beforeload : function(store, operation, eOpts) {
...
store.getProxy().extraParams = submitParams;
}
}
});
解决方法:
你有一个错字:autoload – >自动加载.
您的代码也不显示正在创建的商店的实例. store:’MyStore’需要一个带storeId的现有商店实例:’MyStore’.
你可能想要更像的东西:
Ext.define('myApp.view.myPopup' {...
....
{
xtype: 'grid',
store: { type: 'myStore' },
iconCls: 'x-fa fa-users',
height : 450,
columns: [{
header...
...}
Ext.define('myApp.store.MyStore', {
extend: 'Ext.data.Store',
alias: 'store.myStore',
model: 'myApp.model.modelA',
// ....
});
原文地址:https://codeday.me/bug/20190727/1550406.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。