View Full Version : Store never finish the loading process

9 Nov 2009, 7:41 PM
Hi everybody...

I have a problem while loading the grid store. When I want to display the data store in a grid, sometimes it only shows me the loading sign (I use the load mask of the grid), and the data never display. After I refresh the page, then the data shows up. Sometimes I need to refresh the page more than twice until the data is displayed. I have tried it in Firefox, Google Chrome, and Internet Explorer and the problems are the same.

I use ext js 3.0. Here is the store code :

MatakuliahsDataStore = new Ext.data.Store({
id: 'MatakuliahsDataStore',
proxy: new Ext.data.HttpProxy({
url: 'matakuliahJSON',
method: 'POST'
baseParams:{task: "LISTING_BY_FAKULTAS_LIMIT", fakultas:FakultasSearchField.getValue()},
reader: new Ext.data.JsonReader({
root: 'daftarMatakuliah',
totalProperty: 'total',
id: 'id'
{name: 'id', type: 'int', mapping: 'id'},
{name: 'kode', type: 'string', mapping: 'kode'},
{name: 'nama', type: 'string', mapping: 'nama'},
{name: 'sksAkademik', type: 'int', mapping: 'sksAkademik'},
{name: 'prasyarat', type: 'int', mapping: 'prasyarat'},
{name: 'fakultas', type: 'int', mapping: 'fakultas'},
{name: 'progdi', type: 'int', mapping: 'progdi'}
sortInfo:{field: 'id', direction: "ASC"}

As you can see in the code that I use JSON as the data format. I try to display the JSON data created by the server in console right after the store is load and this is the result :

{"id":3,"progdi":6,"sksBayar":0,"prasyarat":1,"fakultas":7,"kode":"002","nama":"Matkul 1","sksAkademik":3},
{"id":4,"progdi":6,"sksBayar":0,"prasyarat":1,"fakultas":7,"kode":"003","nama":"Matkul 2","sksAkademik":3},
{"id":5,"progdi":7,"sksBayar":0,"prasyarat":1,"fakultas":6,"kode":"004","nama":"Matkul 3","sksAkademik":3}

I also attach the picture that shows the problem.

Really need your help, guys. Viva Ext js Lovers!!
Thanks in advance...

10 Nov 2009, 12:22 AM
Have you tried with firebug or a similar tool whether the data is really transferred when the problem occurs?

11 Nov 2009, 2:08 AM
Hi BitPoet,

Ya I have tried using firebug in firefox. And everytime the data do not display, so the javascript do not receive any data from the server, since the server actually have produced it and send it to the client (it proved by the string that I print in the console, that I show above inside the quote), and vice versa.

What makes me really confused is why sometimes the data can be displayed and why sometimes it can't.