1. #11
    Ext User
    Join Date
    Dec 2007
    Location
    Oxford, MA
    Posts
    83
    Vote Rating
    0
    WBarnie is on a distinguished road

      0  

    Default still not paging

    still not paging


    I am still having problems with the PagingMemoryProxy. I review the sample that you suggested and tried to model my code after your, however, there are many differences. I have specified that only 25 records should be displayed and I have 30 rows and all are being displayed on the first page. The footer is showing that page 1 of 2 on the left side of the footer and right side is shows displaying items 1

  2. #12
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    You appear to be wiping out your hard work after loading it:

    Code:
     ds.on('load', function()
    {                    
       ds = new Ext.data.Store({                                                
       proxy: new Ext.ux.data.PagingMemoryProxy(jsonReader.jsonData),
       reader: jsonReader,
       remoteSort: true
       });
    });
    How come?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #13
    Ext User
    Join Date
    Dec 2007
    Location
    Oxford, MA
    Posts
    83
    Vote Rating
    0
    WBarnie is on a distinguished road

      0  

    Default


    Could you please explain you comments are not helpfiul

  4. #14
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    you comments are not helpfiul
    I thought I just asked a question, geez.

    Are you not re-creating the grid again right after you spent the time to load it, right? You've wiped out all that was to be gained by loading it in the first place, yes?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  5. #15
    Ext User
    Join Date
    Dec 2007
    Location
    Oxford, MA
    Posts
    83
    Vote Rating
    0
    WBarnie is on a distinguished road

      0  

    Default PagingToolbar shoes wrong info and does not page

    PagingToolbar shoes wrong info and does not page


    I am still not able to get this to work. The footer shows that records 1

  6. #16
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Code:
    function setupDataSource(){
         ds = new Ext.data.JsonStore({
          proxy: new Ext.ux.data.PagingMemoryProxy(jsonReader.jsonData),
         url: 'DriveInListingAction.do',
    ux.PagingMemoryProxy handles arrays of array records. It is designed to take the place of your server.

    You are still making GET requests of your server. Why do you need PagingMemProxy at all in that scenario ?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  7. #17
    Ext User
    Join Date
    Dec 2007
    Location
    Oxford, MA
    Posts
    83
    Vote Rating
    0
    WBarnie is on a distinguished road

      0  

    Default


    I need a PagingMemProxy because I want to limit page result to 25 rows per page and I have more than 1 page worth of data. I only want to go to the server the first time to get the result and then use PagingMemProxy. You are telling me what I already know. I know I am going back to the server but I do not know how to fix it. Answer that would be very helpful

  8. #18
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Since you are using PagingMemProxy merely as a local cache of the entire server response, you need only give the PagingMemProxy it's array data when you decide to query the server again:

    Code:
    var driveInGrid = function() {
    var ds;
    var grid;
    var cm;
    var paging;
    var gridFoot;
    var serverObj = new Ext.data.Connection();
    
    function setupDataSource(){
         ds = new Ext.data.Store({
                 proxy: new Ext.ux.data.PagingMemoryProxy([]),  //start out empty
                 id: 'getAppraisalId',
                 reader: new Ext.data.ArrayReader({}, [
                    {name: 'getAppraisalNumber' },
                    {name: 'getAppraisalId' },
                    {name: 'getVehicleModel'},
                     ............
    
                   ]),
                 remoteSort: true
              });
           
    }
    
    
    
    return {
            init : function() {
                setupDataSource();
                buildGrid();
                setupButtons();
                this.load();
            },
            load : function(url,params){
               params || (params = {userAction:'list' ,searchType:document.forms[0].searchType.value, searchValue:document.forms[0].searchValue.value});
                serverObj.request({
                     url: url || 'DriveInListingAction.do',
                     method :'GET', 
                     params : params,
                     success: function(response){
                          //give the proxy the entire array result set
                          ds.proxy.data = Ext.decode(response.responseText);
                          //now, let your paging Store and local Proxy take over 
                          ds.load({params:{ start:0, limit:25}});
                     },
                     failure: youHandleIt
                  });
            },        
            getDataSource: function() {
                return ds;
            }
    };
    To reload from the server again just call (optionally, without any arguments):
    Code:
    driveInGrid.load()
    again when you need to.

    Is that what you're looking to do? If you send back arrays instead of JSON records you're all set.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  9. #19
    Ext User
    Join Date
    Dec 2007
    Location
    Oxford, MA
    Posts
    83
    Vote Rating
    0
    WBarnie is on a distinguished road

      0  

    Default


    The data is in the jsonreader? not an array. All the example use an array reader. Do I need an array reader? How do I get for a jsonread to an array reader? The data is in json format. Thanks!

  10. #20
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    I've only seen it successfully work with arrays.

    You must have seen this then, as your earlier example was modeled after Bean's approach.

    Asked Bean yet?
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


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