1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    4
    Vote Rating
    0
    pbarnes is on a distinguished road

      0  

    Default Ext.data.Store, remoteSort:true and method:'get'

    Ext.data.Store, 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:

    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..

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


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

  3. #3
    Ext JS Premium Member NoahK17's Avatar
    Join Date
    Apr 2008
    Location
    Atlanta, GA
    Posts
    518
    Vote Rating
    1
    NoahK17 is on a distinguished road

      0  

    Default


    But they are not required to be all in uppercase: http://www.w3.org/TR/html401/interact/forms.html#h-17.1
    Noah
    Senior Web Developer
    NBA.com

  4. #4
    Ext User
    Join Date
    Jun 2008
    Posts
    4
    Vote Rating
    0
    pbarnes is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi