1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    4
    Vote Rating
    1
    outlawbt is on a distinguished road

      0  

    Default [Solved] How to get totalProperty value from JsonReader?

    [Solved] How to get totalProperty value from JsonReader?


    Hello, I want to know is is possible to get the value from totalProperty from the following code:

    Code:
    UsersDataStore = new Ext.data.Store({
            id: 'UsersDataStore',
            proxy: new Ext.data.HttpProxy({
                url: requestUrl,
                method: 'POST'
            }),
            baseParams: {
                task: 'LISTING', 
                param: 'ALL'
            }, 
            reader: new Ext.data.JsonReader({
                root: 'results',
                totalProperty: 'total',
                id: 'id'
            },
    .
    .
    .
    etc...
    I tried the following :
    Code:
    alert(UsersDataStore.reader.totalProperty)
    but i get "undefined" as result...

  2. #2
    Ext User
    Join Date
    Mar 2009
    Posts
    5
    Vote Rating
    0
    Capzilla is on a distinguished road

      0  

    Default


    reader isn't a public property. And I don't think totalProperty is one in DataReader. Try:

    UsersDataStore.getReader().getTotalProperty()

    (off the head, check the API to be sure)

  3. #3
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      1  

    Default


    I think you may be looking for: http://extjs.com/deploy/dev/docs/?cl...ember=jsonData

    Try:
    Code:
    var total = grid.store.reader.jsonData.total;
    And the "total" property within jsonData depends on how you configured totalProperty in the first place.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    You don't state what you're really doing, but you may be looking for:
    Code:
    store.getTotalCount();

  5. #5
    Ext User
    Join Date
    Jan 2009
    Posts
    4
    Vote Rating
    1
    outlawbt is on a distinguished road

      1  

    Default


    Quote Originally Posted by mjlecomte View Post
    I think you may be looking for: http://extjs.com/deploy/dev/docs/?cl...ember=jsonData

    Try:
    Code:
    var total = grid.store.reader.jsonData.total;
    And the "total" property within jsonData depends on how you configured totalProperty in the first place.
    Yes, this has worked for me.. Thank you so much !

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..." hd porno faketaxi