views:

29

answers:

2

I'm using an Ext.data.JsonReader defined like so:

new Ext.data.JsonReader ( { totalProperty: 'totalCount', successProperty: 'success', idProperty: 'id', root: 'data', messageProperty: 'message' },

[{ name: 'id' }, { name: 'a'}, { name: 'b'}, { name: 'c'}, {name: 'd'}, {name: 'e'}, {name: 'f'} ])};

to read a message defined that comes in looking something like this:

({"totalCount": 1, "message":"Loaded data", "success":true, "data": [{"id":"1", "a":"", "b":"", "c":"", "d":"0"}] })

I'm catching the exception in a function along these lines:

Ext.data.DataProxy.addListener('exception', function (proxy, type, action, options, res) { ExtJSUtils.App.setAlert(false, 'An error occurred while executing ' + action); });

Any pointers on where I might find what kind of exception I'm looking at, or what the problem might be?

The discrepancy in number of items expected by the Json reader, I'm told, is not the cause of my problems.

A: 

The last portion of your declaration is messed up. I believe this:

...{name: 'f'}, ]);};

should be like this:

....{name: 'f'}]);

I would suggest proper code indentation to avoid these types of issues. Not sure if it's your specific issue, but it's an issue.

bmoeskau
I think I copied it wrong from the original - corrected the question.
blueberryfields
A: 

The documentation on the Ext website lists all of the information that can be obtained about this error. It doesn't help much, but is all that I have been able to find.

blueberryfields