1. #1
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    236
    Vote Rating
    0
    CutterBl is on a distinguished road

      0  

    Question Problem getting remoteSort: true action with column sort

    Problem getting remoteSort: true action with column sort


    I have a JsonStore with a remoteSort attribute of 'true'. According to the 2.0 documentation:

    True if sorting is to be handled by requesting the Proxy to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache in place (defaults to false).

    If remote sorting is specified, then clicking on a column header causes the current page to be requested from the server
    In my Grid, paging appears to be working fine, unless someone has clicked a column header for sorting first. Rather than going to the server for a fresh data set meeting the sort criteria, it is sorting from the current record cache, then goes to the server on each additional request. This is a major issue, as it throws off the end data being given back to the user (records that may appear twice, depending on which page they began on, etc.)

    Any suggestions?
    --
    Steve "Cutter" Blades
    Adobe Community Professional - ColdFusion
    Adobe Certified Professional - Advanced Macromedia ColdFusion MX 7 Developer

    _____________________________
    Blog: Cutter's Crossing

    Co-Author "Learning Ext JS 3.2"

  2. #2
    Ext User battisti's Avatar
    Join Date
    Oct 2007
    Location
    Brasil / PR / Cascavel
    Posts
    58
    Vote Rating
    0
    battisti is on a distinguished road

      0  

    Default


    post a code of your search in server side, and a js os your grid .
    []'s Anselmo Battisti
    anselmobattistigmail.com
    del.icio.us/anselmobattisti
    battisti.wordpress.com

  3. #3
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    236
    Vote Rating
    0
    CutterBl is on a distinguished road

      0  

    Question JsonStore config

    JsonStore config


    I can't really post the server side, for a variety of reasons. It doesn't really matter, because the initial sort, from clicking on a column header, is being done on the local cache (I just don't know why). Paging from there always does the remote call, as it should. Here is an abbreviated config, with the columns removed, to show the other base config:

    Code:
        var ds = new Ext.data.JsonStore({
            url:'/RemoteProxy.cfc',
            baseParams: {
                // some post params
            },
            totalProperty: 'totalCount',
            root: 'root',
            fields: [{
                // several columns identified by name/mapping pairs
            }],
            remoteSort: true,
    		listeners:{
    			'beforeload':{
    				fn:function(){
    					// some basic stuff here with baseParams
    				},
    				scope:this
    			}
    		}
        });
    --
    Steve "Cutter" Blades
    Adobe Community Professional - ColdFusion
    Adobe Certified Professional - Advanced Macromedia ColdFusion MX 7 Developer

    _____________________________
    Blog: Cutter's Crossing

    Co-Author "Learning Ext JS 3.2"

  4. #4
    Ext User battisti's Avatar
    Join Date
    Oct 2007
    Location
    Brasil / PR / Cascavel
    Posts
    58
    Vote Rating
    0
    battisti is on a distinguished road

      0  

    Default


    try something like this

    PHP Code:
       var store = new Ext.data.Store({
        
    proxy: new Ext.data.HttpProxy({
           
    url'url'
       
    }),
                
       
    reader: new Ext.data.JsonReader({
        
    root'dados',
        
    totalProperty'total',
        
    id'pri_cod',
        
    fields: [
           {
    name:'pri_cod'type:'string'},
             {
    name:'pri_nome'type:'string'},
           {
    name:'pri_data'type:'date',dateFormat:'Y-m-d'},
           {
    name:'est_cod'type:'int'}]
         }),
              
    // turn on remote sorting
          
    [B]remoteSorttrue[/B]
            }); 
    []'s Anselmo Battisti
    anselmobattistigmail.com
    del.icio.us/anselmobattisti
    battisti.wordpress.com

  5. #5
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    236
    Vote Rating
    0
    CutterBl is on a distinguished road

      0  

    Smile Success

    Success


    Yeah, I already had that in the above script. I did finally get it, placing the remoteSort attribute option before my fields definition. I also removed the single quotes around the beforeload handler name. Suddenly I'm gold. Odd, but it works. Thanks for the assist though.
    --
    Steve "Cutter" Blades
    Adobe Community Professional - ColdFusion
    Adobe Certified Professional - Advanced Macromedia ColdFusion MX 7 Developer

    _____________________________
    Blog: Cutter's Crossing

    Co-Author "Learning Ext JS 3.2"

Thread Participants: 1

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