0
votes

I'm new to ExtJs and I hate javascript, but now I have to do this. I have the following code:

        var proxy = new Ext.data.HttpProxy(
                {
                url: 'sf/listUsers', 
                headers: {'Content-Type': 'application/json'}
                }
            );

            var store = new Ext.data.JsonStore({
                proxy: proxy,
                remoteSort: true,
                sortInfo: { field: "username", direction: "ASC" },
                totalProperty: 'count',
                root: 'users',
                fields: ['username', 'id'],
                writer : new Ext.data.JsonWriter({
                    encode : true,
                    writeAllFields : true
                })

            });

When I try the page, the grid doesn't show anything, I can see in chrome, that the request's content-type is text/html.

1

1 Answers

0
votes

From the docs:

Be aware that to enable the browser to parse an XML document, the server must set the Content-Type header in the HTTP response to "text/xml"