1. #1
    Sencha User
    Join Date
    Apr 2007
    Posts
    83
    Answers
    2
    Vote Rating
    5
    bobmanc is on a distinguished road

      0  

    Default Answered: paging toolbar page not updating

    Answered: paging toolbar page not updating


    I am using a paging toolbar and if I manually click to the second page it works fine but if I then issue a
    store().load({params:{start:0,limit:10}}); the load works correctly, the first 10 records are sent back but the toolbar still says Page 2. Any ideas?

    I am using ExtJS 4.1. Thanks.

  2. so you can use moveFirst method of PagingToolbar component. It should do the same with clicking first page icon on PagingToolbar.

  3. #2
    Sencha User
    Join Date
    Jan 2011
    Location
    San Juan, PR
    Posts
    80
    Vote Rating
    5
    vela1606 is on a distinguished road

      0  

    Default


    is your totalProperty correct?

    PHP Code:

    {   
         
    "success"true,    
         
    "results"2000, <-------// this    
         
    "rows": [ // ***Note:** this must be an Array        
              
    "id":  1"name""Bill""occupation""Gardener" },        
              { 
    "id":  2"name":  "Ben""occupation""Horticulturalist" },
               ...        
              { 
    "id"25"name":  "Sue""occupation""Botanist" }   
          ]

    |:| GaiaEHR |:| A Open Source Software for Electronic Health Records - Lead Developer

  4. #3
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    303
    Answers
    8
    Vote Rating
    0
    talha06 is on a distinguished road

      0  

    Default


    Actually you don't need to load store with start and limit parameters. All you need is setting pageSize configuration in your store.

    Then you can call store's load method without any extra parameters. Store will take care of start and limit paramaters. It'll load store with incremented start parameter on each page load.
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

  5. #4
    Sencha User
    Join Date
    Apr 2007
    Posts
    83
    Answers
    2
    Vote Rating
    5
    bobmanc is on a distinguished road

      0  

    Default


    The total returned is correct.

    I need to reset the start param so it gets the first ten records (which it does) instead of the second ten. Everything on the server side is working correctly. The only problem is the page number doesn't reset to 1 but stays at 2.

  6. #5
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    303
    Answers
    8
    Vote Rating
    0
    talha06 is on a distinguished road

      0  

    Default


    so you can use moveFirst method of PagingToolbar component. It should do the same with clicking first page icon on PagingToolbar.
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

  7. #6
    Sencha User
    Join Date
    Apr 2007
    Posts
    83
    Answers
    2
    Vote Rating
    5
    bobmanc is on a distinguished road

      0  

    Default


    That did it. I never would have thought MoveFirst would be the name for the method. It should be SetPage or something similar. Thanks for the help.

  8. #7
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    303
    Answers
    8
    Vote Rating
    0
    talha06 is on a distinguished road

      0  

    Default


    glad to be helpful.
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

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