Не грузятся данные с сервера...
Такой код:
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [ 'name', 'email', 'phone' ]
});
var userStore = Ext.create('Ext.data.Store', {
model: 'User',
pageSize: 4,
proxy: {
type: 'ajax',
url : 'users.json',
reader: {
type: 'json',
rootProperty: 'users',
totalProperty: 'total'
},
},
storeId: "userStore",
autoSync: true,
autoLoad: true,
// autoLoad: true
});
console.log(userStore);
Ext.define('MyGrid.view.main.Main', {
extend: 'Ext.container.Container',
xtype: 'app-main',
controller: 'main',
viewModel: {
type: 'main'
},
layout: {
type: 'border'
},
items: [{
xtype: 'panel',
bind: {
title: '{name}'
},
region: 'west',
html: '<ul><li>This area is commonly used for navigation, for example, using a "tree" component.</li></ul>',
width: 250,
split: true,
tbar: [{
text: 'Button',
handler: 'onClickButton'
}]
},{
region: 'center',
xtype: 'tabpanel',
items:[{
title: 'Tab 1',
xtype: 'grid',
store: userStore,
width: 400,
height: 200,
columns: [
{
text: 'Name',
width: 100,
sortable: false,
hideable: false,
dataIndex: 'name'
},
{
text: 'Email Address',
width: 150,
dataIndex: 'email',
// hidden: true
},
{
text: 'Phone Number',
flex: 1,
dataIndex: 'phone'
}
]
}]
}]
});
Вызывает такую ошибку: Uncaught TypeError: undefined is not a function Server.js:223 |
что написано в 233 строке файла Server.js?
|
Ошибка в 223 строке
request = new Ext.data.Request({
params : params,
action : operation.getAction(),
records : operation.getRecords(),
url : operation.getUrl(),
operation: operation,
// this is needed by JsonSimlet in order to properly construct responses for
// requests from this proxy
proxy: me
});
|
И какая из них 223?
|
| Часовой пояс GMT +3, время: 11:40. |