[TYPO3-dev] Creating an ExtJS grid with JSON data in a BE module

"Christian Müller (Kitsunet)" christian at kitsunet.de
Tue Nov 30 09:28:52 CET 2010


On 30.11.2010 09:22, François Suter wrote:
> Hi all,
>
> I'm not sure where to post this question, so here goes.
>
> I'm developing a BE module which - at some points - launches an AJAX
> request and receives a JSON response. This response is actually an array
> and I would like to "inject" it into an ExtJS grid for display. Is there
> any recommended way to achieve that inside a BE module?
>
> Thanks in advance for any pointer.
>

Hi Francois,

I guess I would go a pretty straightforward way and try to use a 
JsonReader and Store connected to the grid. In that case the JSON 
response would have to have a defined format (unless you rewrite the 
JsonReader). If you want to make the request and decoding of JSON 
yourself and just work with the array you could connect the grid to an 
ArrayStore and feed your array directly into the store.

Christian



[1] http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.JsonReader
[2] http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.ArrayStore





More information about the TYPO3-dev mailing list