View Full Version : Custom JsonReader & how to plug it into Ext Designer's generated code

16 Aug 2011, 1:52 AM
I'm working with a JSON API that returns a slightly different JSON shape than Ext expects.
To solve this i've subclassed Ext.data.JsonReader::readRecords method. From my research I believe this is sufficient to marshal the data into the Store.

My question is how can I integrate this new custom Reader class into the generated code from Ext Designer?

The JsonStore object generated from Designer is a do-not-edit file. So I think I need to instantiate a new instance of the reader, attach it to the existing JsonStore instance, and reload the data.
Can you also provide any tips on making this as efficient as possible; I'm aware that there's probably some work going on for that Store that isn't going to be needed as I'm throwing away it's reader implementation post-init.