Hi all,
Newb ExtJS (2.1) user here, but enjoying it so far. Had a quick question, not sure if it's a bug or not, but wanted to ask to be sure -- I'm trying to populated a xg.GridPanel using what I think is the standard approach: xd.Store w/ xd.HttpProxy and xd.JsonReader (server side is a Rails app). When setting up the Connection options for the xd.HttpProxy I noticed something funky with respect to sorting, where the sort parameter weren't being passed. My code:
Code:
var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'http://localhost:3000/categories.json',
method:'get',
headers: {"Content-Type": "application/json; charset=utf-8"}
}),
reader: new Ext.data.JsonReader({
root: 'categories',
totalProperty: 'totalCount',
id: 'catid',
fields: ['name', 'subcategory_name', 'gl_account', 'summary_gl_account']
}),
remoteSort: true,
sortInfo: {field:'subcategory_name', direction:'desc'}
});
Notice the "method:'get'" line -- the HTTP verb is lower case. When it is, the sort parameters (and therefore I assume paging paramters) DON'T get sent as a part of the URL. If I change it to capital letters, as in "method:'GET'" it does.
I realize that HTTP verbs should (probably?) be upper case, but should this be considered a bug? It took me a while to figure out the issue.
Thanks.
Phil..