Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
    rsmoorthy is on a distinguished road

      0  

    Default ExtJS4: JsonReader: Ignoring the value set for totalProperty

    ExtJS4: JsonReader: Ignoring the value set for totalProperty


    I am migrating from jqGrid to ExtJS4, and would like to keep the server side code same for both. I have downloaded 4.0.7gpl version.

    While returning JSON data for a Grid, the server sends the following parameters:
    Code:
    { total: 7, page: 1, records: 350, rows: [......] }
    In the Ext Store configuration, I have set pageSize to 50 and the Store and JsonReader is configured as follows:
    Code:
    that.store = Ext.create('Ext.data.Store', {
                pageSize: 50,
                model: that.model,
                remoteSort: true,
                proxy: {
                    type: 'ajax',
                    url: '/db.php',
                    limitParam: 'rows',
                    pageParam: 'page',
                    reader: {
                        type: 'json',
                        root: "rows",
                        totalPropery: "records"
                    }   
                },
    As you notice, the totalProperty has been set to "records". But ExtJS4 always reads the "total" parameter returned, inspite of specifying to read "records" parameter. As I see in the documation, the default value for totalProperty is "total".

    If I make the server not send the "total" parameter, ExtJS4 correctly reads the "records" parameter to find the total number of records in the dataset.

    The Fix required:

    Since the totalProperty has been set to "records", the store should read that parameter only and not look for "total" property, which may be sent by the server.

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
    rsmoorthy is on a distinguished road

      0  

    Default


    Sorry! Please ignore this question.

    Just noticed that there was a typo for totalProperty, (instead I had specified totalPropery).

Tags for this Thread

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