Hybrid View

  1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    3
    Vote Rating
    0
    tpouyer is on a distinguished road

      0  

    Question Grid Pagination Using Different Params for start and limit

    Grid Pagination Using Different Params for start and limit


    I am building a grid with pagination using a PagingToolbar and a Store created from a ScriptTagProxy using a JSONReader. My problem is that the remote json feed is a google base feed and I cannot change the pagination parameters that it expects: start-index and max-results instead of the start and limit that Ext wants me to use. My question is, is there a way I can change these parameter names, I know that the ScriptTagProxy supports changing the callback parameter name so I was hoping that this sort of functionality would also be supported by the PagingToolbar or Store objects.

    Thanks for any help you can give me.

    Tim Pouyer

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    See this thread for how to implement passing additional/different params.

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    3
    Vote Rating
    0
    tpouyer is on a distinguished road

      0  

    Default Not the solution I was hoping for

    Not the solution I was hoping for


    I can figure out how to send the appropriate parameters to the server but there is something built into either the Grid, Store, or PaggingToolbar that is looking for the 'start' property in the params object and it's causing me huge headaces ( I have to apply something directly to my forehead ). Anyway the PaggingToolbar will display the total number of records fine and the total number of pages correctly but the text 'Displaying 1 - 25 of 151' looks like this 'Displaying NaN - NaN of 151' and the Page textbox on the toolbar shows the same thing 'NaN' instead of a page number. I believe that this is because something cannot calculate the starting index for the grid because I am not passing the 'start' parameter. Any help in figuring out how I can fix this would greatly be appreciated.

    Thanks,

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    You still have to set those properties, regardless of whether you're passing additional ones to the server (and ignoring start and limit). Alternately, you could modify the code of PagingToolbar to use different names.

  5. #5
    Ext User
    Join Date
    Jun 2007
    Posts
    3
    Vote Rating
    0
    tpouyer is on a distinguished road

      0  

    Default Had to modify code

    Had to modify code


    So I figured out that PagingToolbar will use the start and limit even if you never pass them in the original params object when calling the Store.load() method. I can understand why it is done the way it is but I think that I might not be the only person who might want to use different names instead of start and limit. Also figured out that PagingToolbar always assumes a zero indexed list of results. i.e. if you want your first page index to be 1 instead of 0 you are going to run into issues. Again, my case is a little unusual b/c I cannot change the server-side code I'm using google base as the server I'm sending my requests to so these are issues pertaining to integrating the PagingToolbar with data comming from google base.

    Thanks,
    Tim Pouyer

  6. #6
    Ext User matjaz's Avatar
    Join Date
    Apr 2007
    Location
    Slovenia
    Posts
    126
    Vote Rating
    0
    matjaz is on a distinguished road

      0  

    Default


    Try changing params using beforeload event.

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