Hi,
I am looking for some guidance with a very rudimentary issue that has me well stumped.
When I load my form I get the following error "Uncaught TypeError: Cannot read property 'buffered' of undefined "
the code I have is as follows.
my model
and my store
my json data is
As best I can tell this is not very complex, and my code follows the docs from http://ift.tt/Sl0r8L
I am looking for some guidance with a very rudimentary issue that has me well stumped.
When I load my form I get the following error "Uncaught TypeError: Cannot read property 'buffered' of undefined "
the code I have is as follows.
Code:
Ext.define('ExtDesktop.view.newUserFrm', { extend: 'Ext.panel.Panel',
alias: 'widget.newUsers',
requires: [
'ExtDesktop.store.MyUserStore'
],
stateId: 'newUser',
height: 250,
width: 594,
initComponent: function() {
var me = this;
Ext.applyIf(me, {
dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
layout: {
pack: 'end',
type: 'hbox'
},
items: [
{
xtype: 'button',
width: 100,
iconCls: 'icon-save',
text: 'Save'
},
{
xtype: 'button',
width: 100,
iconCls: 'icon-cancel',
text: 'Cancel'
},
{
xtype: 'button',
cls: 'btn-help',
width: 75,
iconCls: 'icon-help',
text: 'Help'
}
]
}
],
items: [
{
xtype: 'gridpanel',
id: 'userGrid',
title: 'My Grid Panel',
store: 'usersJsonStore',
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'FirstName',
text: 'first'
},
{
xtype: 'gridcolumn',
dataIndex: 'LastName',
text: 'last name'
},
{
xtype: 'gridcolumn',
dataIndex: 'Email',
text: 'email'
}
]
}
]
});
me.callParent(arguments);
}
});
my model
Code:
Ext.define('ExtDesktop.model.userData3', { extend: 'Ext.data.Model',
fields: [
{
name: 'idClientUser',
type: 'int'
},
{
name: 'userID',
type: 'string'
},
{
name: 'FirstName',
type: 'string'
},
{
name: 'LastName',
type: 'string'
},
{
name: 'CreateDate',
type: 'date'
},
{
name: 'ValidTo',
type: 'date'
},
{
name: 'LastLogin',
type: 'date'
},
{
name: 'Status',
type: 'string'
},
{
name: 'Email',
type: 'string'
},
{
name: 'Password',
type: 'string'
},
{
name: 'SecToken',
type: 'string'
}
]
});
and my store
Code:
Ext.define('ExtDesktop.store.usersJsonStore', { extend: 'Ext.data.Store',
requires: [
'ExtDesktop.model.userData3'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
filterOnLoad: false,
model: 'ExtDesktop.model.userData3',
sortOnLoad: false,
storeId: 'stid1',
buffered: true,
proxy: {
type: 'ajax',
url: '/data/getUsers.txt',
reader: {
type: 'json',
root: 'data'
}
}
}, cfg)]);
}
});
my json data is
Code:
{ "success" : 1,
"advisory" : "",
"records" : 1,
"fields" : "idClientUser,userID,FirstName,LastName,CreateDate,ValidTo,LastLogin,Status,Email,Password,SecToken",
"data" : [
{"idClientUser":16,
"userID":"admin",
"FirstName":"System",
"LastName":"Administrator",
"CreateDate":"3/27/2014 2:16:28 PM",
"ValidTo":"12/31/2099 11:59:59 PM",
"LastLogin":"5/20/2014 9:44:46 PM",
"Status":"A",
"Email":"admin@webworksonline.com",
"Password":"Passw0rd",
"SecToken":"111111111111111111111111"
},
{"idClientUser":17,
"userID":"admin2",
"FirstName":"System",
"LastName":"Administrator",
"CreateDate":"3/27/2014 2:16:28 PM",
"ValidTo":"12/31/2099 11:59:59 PM",
"LastLogin":"5/20/2014 9:44:46 PM",
"Status":"A",
"Email":"admin2@webworksonline.com",
"Password":"Passw0rd",
"SecToken":"111111111111111111111111"
}
]
}
As best I can tell this is not very complex, and my code follows the docs from http://ift.tt/Sl0r8L
Any help would be greatly appreciated,
-Allen
Aucun commentaire:
Enregistrer un commentaire