1. #31
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    I already put your feature request into PagingStore. It runs fine.

  2. #32
    Ext User brizardh's Avatar
    Join Date
    Mar 2008
    Posts
    16
    Vote Rating
    0
    brizardh is on a distinguished road

      0  

    Default Wondering if some functionalities are available or not...

    Wondering if some functionalities are available or not...


    Hello,

    I have some questions concerning the Paging Store whereas if some functionalities are available or not :

    1 - Can it remember the states (cookie) - I.e the last page the user was on...? It also seems like if I put a filter in, it won't remember it ... is it normal? It does remember it when i dont use the PagingStore.

    2 - When I filter the data, is it suppose to update the paginator's total pages accordingly? I need to hit refresh button in order to update the data - did i missed something?

    3 - Also if i'm located on page 3 of 5 and I filter some data that only has few records (1 page), it leaves me on the 3rd page. Should it redirect me automatically on the 1st page?

    4 - Using a PagingGroupingStore, if I select a header and click group by this field, i get an error of : "this.applyGroupField is not a function". If i click again, i get no errors, but it doesn't group by this field until I hit the refresh button of the paginator - Is it the same refresh problem of the filters?

    Overall, I'm really impressed by this feature, it saves a lot of coding time - Many thanks!!!!!!

  3. #33
    Ext User brizardh's Avatar
    Join Date
    Mar 2008
    Posts
    16
    Vote Rating
    0
    brizardh is on a distinguished road

      0  

    Default


    For point 2 :
    I added
    Code:
    myGrid.on({ filterupdate: this.updatePaginator, afterrender: this.updatePaginator });
    and
    Code:
        updatePaginator: function() {
            // Used to update the paginator after the grid is loaded or  filtered (if filters were still selected, normally it wont update the paginators values)
            var updatePaginator = new Ext.util.DelayedTask(function() {
                Ext.getCmp("myPagingToolBar").doLoad(0);
            });
            updatePaginator.delay(500);
        },
    Dont know if its the right way to do it, but that way it will call the update of the paginator after the filter was done, updating the records count and the page...

    For point 3 :
    Code:
    var myBottomBar = new Ext.PagingToolbar({ // Optional
                    id: 'myPagingToolBar',
                    store: myStore,
                    plugins: [myFilters]
                });


    For point 4 :
    Code:
    Ext.ux.data.PagingGroupingStore = Ext.extend(Ext.ux.data.PagingStore, {
        remoteGroup: Ext.data.GroupingStore.prototype.remoteGroup,
        groupOnSort: Ext.data.GroupingStore.prototype.groupOnSort,
        clearGrouping: Ext.data.GroupingStore.prototype.clearGrouping,
        groupBy: Ext.data.GroupingStore.prototype.groupBy,
        applyGroupField: Ext.data.GroupingStore.prototype.applyGroupField,
        applySort: Ext.data.GroupingStore.prototype.applySort,
        applyGrouping: Ext.data.GroupingStore.prototype.applyGrouping,
        getGroupState: Ext.data.GroupingStore.prototype.getGroupState
    });
    fixed my problem

  4. #34
    Ext User
    Join Date
    Mar 2009
    Posts
    10
    Vote Rating
    0
    ferryman is on a distinguished road

      0  

    Default


    Hi all
    Use code:
    PHP Code:
           var store = new Ext.ux.data.PagingArrayStore({
                        
    fields:[...],
                        
    url:'data.backend.php',
                        
    root:'rows',
                        
    totalProperty:'totalCount',
                        
    autoLoad:{params: {start0limit"set totalCount"}}
          }); 
    My English is not good(
    How to get json response "totalCount" and set to parameter limit?

    Json response:
    PHP Code:
    {"totalCount":2,"rows":[{...},{...},{...}]} 

  5. #35
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by ferryman View Post
    How to get json response "totalCount" and set to parameter limit?
    Can you explain why you would want this?

    ps. You don't really need a totalProperty in PagingStore.

  6. #36
    Ext User
    Join Date
    Mar 2009
    Posts
    10
    Vote Rating
    0
    ferryman is on a distinguished road

      0  

    Default


    In my application I have a function that allows user to skip through the rows of data by pressing "next" button. Right now every time when the user presses the button it fires a request that queries the database and fetches the next bit of data, which works fine but with some delays. So the solution that I want to implement is to fetch quite a considerable amount of data into array in one go and then feed it to user bit by bit when requested, this way the response time of the web site will be almost instant. Also I want to write a function that would wach the position of the pointer in this array and fetch more data from the database when it gets close to the end of the array.

  7. #37
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Yes, there are more people asking for this...

    PagingStore isn't capable of doing this, so it would require extra coding on your part (you need to add the extra loaded data to the internal allData MixedCollection).

  8. #38
    Ext User
    Join Date
    Mar 2009
    Posts
    10
    Vote Rating
    0
    ferryman is on a distinguished road

      0  

    Default


    Im do it
    PHP Code:
    var request = new Ext.data.JsonStore({
                                
    id:'getCount',
                                
    root:'totalCount',
                                
    url:'getCount.php',
                                
    fields:[{name:'total'}]
         });

         
    request.load();

         
    request.on('load', function(requestrecordoptions){

         var 
    store = new Ext.ux.data.PagingArrayStore({
                        
    fields:[...],
                        
    url:'data.backend.php',
                        
    root:'rows',
                        
    totalProperty:'totalCount',
                         
    autoLoad:{params: {start0limitrequest.totalLength}}
          });


          var 
    pageToolBar = new Ext.PagingToolbar({
                     
    pageSizerequest.totalLength,
                     
    storestore
          
    });

    ........... 

  9. #39
    Sencha User Mjollnir26's Avatar
    Join Date
    Oct 2008
    Location
    Germany
    Posts
    152
    Vote Rating
    0
    Mjollnir26 is on a distinguished road

      0  

    Default Very very big thanks

    Very very big thanks


    Hello Condor,
    just wanted to say thanks a real real real big bunch, for once more saving my Ass,
    this time without even knowing it. Your Store is working like a Champ!

  10. #40
    Ext User
    Join Date
    Mar 2009
    Posts
    16
    Vote Rating
    0
    cwford is on a distinguished road

      0  

    Default Adding my thanks

    Adding my thanks


    Condor,

    Just want to add my thanks to the rest for this extension. Really saved me a lot of time and grief. Nice job!

Thread Participants: 106

  1. Animal (3 Posts)
  2. galdaka (2 Posts)
  3. cgi-bin (4 Posts)
  4. tchitani (4 Posts)
  5. tobiu (1 Post)
  6. steffenk (1 Post)
  7. renaudham (1 Post)
  8. markpele (1 Post)
  9. Sesshomurai (1 Post)
  10. teddyjas (5 Posts)
  11. buergi (2 Posts)
  12. Buzzwords (2 Posts)
  13. tomcheng76 (4 Posts)
  14. kveeiv (1 Post)
  15. dhisnotnull (2 Posts)
  16. walldorff (1 Post)
  17. brizardh (2 Posts)
  18. elizard (1 Post)
  19. Remy (1 Post)
  20. renoye (8 Posts)
  21. despay (1 Post)
  22. lwexler (2 Posts)
  23. tomim (1 Post)
  24. Mjollnir26 (1 Post)
  25. allenlako (3 Posts)
  26. Andrea Gioia (1 Post)
  27. wp.joju (1 Post)
  28. genio (2 Posts)
  29. 828 (1 Post)
  30. ljschrenk (4 Posts)
  31. diablo (3 Posts)
  32. blakel (1 Post)
  33. Grolubao (2 Posts)
  34. makiavelli (2 Posts)
  35. elesel (1 Post)
  36. Capt.JackSparrow (2 Posts)
  37. ferryman (3 Posts)
  38. cwford (1 Post)
  39. 3dm (1 Post)
  40. imnilesh (1 Post)
  41. Rotterdam (2 Posts)
  42. nandubochkar (1 Post)
  43. Dustin Graham (1 Post)
  44. Boing (2 Posts)
  45. tdteti_ (8 Posts)
  46. vtulin (2 Posts)
  47. hello (1 Post)
  48. PranKe01 (2 Posts)
  49. jbusuulwa (6 Posts)
  50. cwilson (1 Post)
  51. ronaldploeger (1 Post)
  52. scblue (1 Post)
  53. saadkhan (2 Posts)
  54. subbugv (6 Posts)
  55. p3p3 (1 Post)
  56. computeraholic (1 Post)
  57. calabacita (3 Posts)
  58. aghextjs (1 Post)
  59. Arindam Das (1 Post)
  60. aw_zahid (1 Post)
  61. deister (1 Post)
  62. billprince (1 Post)
  63. amol.gaikwad (2 Posts)
  64. george4rotech (7 Posts)
  65. leonrenkema (1 Post)
  66. mvassau (1 Post)
  67. aDoF96 (2 Posts)
  68. attack11 (3 Posts)
  69. chakrics (1 Post)
  70. thangamalar (3 Posts)
  71. mayurid (1 Post)
  72. Lobo (1 Post)
  73. christian130 (3 Posts)
  74. elbino (3 Posts)
  75. eashwaranp (1 Post)
  76. atul.sachan@capgemini.com (3 Posts)
  77. Joe Kuan (1 Post)
  78. kent78 (4 Posts)
  79. dsk1962 (1 Post)
  80. Woodlander (3 Posts)
  81. msmolyak (1 Post)
  82. mond (4 Posts)
  83. anandhasubha (1 Post)
  84. David Warren (1 Post)
  85. colinm (2 Posts)
  86. sothea (1 Post)
  87. incanus (1 Post)
  88. MarceloCajr (1 Post)
  89. knackwurst (1 Post)
  90. Pattie (1 Post)
  91. parnold3 (1 Post)
  92. StanimirPanchev (1 Post)
  93. palashkumar1010 (1 Post)
  94. ash4aque (3 Posts)
  95. farfar (3 Posts)
  96. PrashanthShetty (1 Post)
  97. brprashanth (2 Posts)
  98. perseusy (3 Posts)
  99. theWalli (1 Post)
  100. hieu79vn (1 Post)
  101. Hisamitsu (1 Post)
  102. hensor (1 Post)
  103. northmh (3 Posts)
  104. parax (1 Post)
  105. PankajG (1 Post)
  106. reedcat (1 Post)