PDA

View Full Version : Ext.JsonStore one field is coming null



tameshwar
30 Jan 2013, 11:10 PM
Hi,

I have a jsonStore which is having 6 fields and 200 records, its working fine, but somehow one field of jsonStore is coming null, when i print the json it is coming null in one field but in the database it has the data,.
===============================


var URLdata = 'php_file/jsonRecord.php';
var storedata = new Ext.data.JsonStore({
fields: ['hnum', 'hcity','hstate' ,'hname' ,'hportal','hprocessing']
,root: 'hjsonObj'
,proxy: new Ext.data.HttpProxy({url:URLdata, method:'GET'})});
storedata.load();

============================

Please help me out.
Thanks

willigogs
31 Jan 2013, 12:21 AM
If you're checking the returned raw JSON string from the server, and it doesn't include one entire column of records, then I would suggest something is going wrong in your middle / back end code, and not inside EXTJS.

To check your raw json data:


var URLdata = 'php_file/jsonRecord.php';


var storedata = new Ext.data.JsonStore({
fields: ['hnum', 'hcity','hstate' ,'hname' ,'hportal','hprocessing'],
root: 'hjsonObj',
proxy: new Ext.data.HttpProxy({
url:URLdata,
method:'GET'
}),
listeners: {
load: function(thisStore, records, o) {
console.log(Ext.encode(thisStore.reader.jsonData))
}
}
});


storedata.load();

tameshwar
31 Jan 2013, 10:05 PM
Hi Willigogs.

Thank for you quick response.

Yes it is back end problem.

Once again Thanks.