Results 1 to 4 of 4

Thread:, remoteSort:true and method:'get'

  1. #1

    Default, remoteSort:true and method:'get'

    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:

    var store = new{
    	proxy: new{
    		url: 'http://localhost:3000/categories.json', 
    		headers: {"Content-Type": "application/json; charset=utf-8"}
        reader: new{
            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.



  2. #2


    GET and POST have always been specified as all caps in any language I have seen.

  3. #3
    Sencha Premium User NoahK17's Avatar
    Join Date
    Apr 2008
    Atlanta, GA


    But they are not required to be all in uppercase:
    Front-End Developer
    Norfolk Southern

  4. #4


    Well, I suppose if you're dealing directly with the HTTP request headers, you'd be right I typed it lower case out of habit I guess, as when specifying routes in Rails, you typically specify the parameter as a lower case symbol, such as ":method => :get". If that's the way it is, that's fine, I'd just recommend the framework trapping that and at least logging something - or better yet just upcasing it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts