View Full Version : rawData undefined for first POST action

7 Jun 2012, 2:24 PM

I am trying to fill a form with server response data obtained whenever I click on a name in a grid. For the most part, I have succeeded in doing this. However, for some reason, the very first time I click on a name in the grid, I get "undefine" for store.proxy.reader.rawData. It doesn't matter which name I click first, it always does this. Any subsequent clicks return the expected json string. I am using firebug to help me solve the problem.

The following is the code for the store 'PersonS' where I make the ajax request:

extend: 'Ext.data.Store',
model: 'CX.model.PersonM',
autoLoad: false,
type: 'ajax',
actionMethods: {
url: '.../CensusXPHP/app/store/getUserIdInfo.php',
type: 'json'

The following is the function within the controller where the above store is loaded.

showMess: function(grid,record)
var tempId = record.get('transId'); //grab translation ID
var name = record.get('fname') + ' ' + record.get('lname'); //grab name of current user
var store = this.getPersonSStore();

var info = store.data;
I am printing two things to the console: the store.data object and store.proxy.reader.rawData. The image immediately below shows the POST and console print statements for the first two click events.
I clicked on the same name both times. As you can see, the store.data object says it has zero items during the first click and the rawData is "undefine; HOWEVER, when I expand the information for store.data object for the first click you can see that there is indeed an item with the json string (it is the same info as the second click item because I clicked on the same name twice). The second image shows this.

I have no idea what's going on. I have been working with ExtJS for about two weeks so it is difficult for me to see any subtle errors (or even glaring ones :s). Will someone please point me in the right direction?

Thanks for your help!