Results 1 to 9 of 9

Thread: [FIXED-434] 0.97: Ext.data.Reader "this.getTotal is not a function" error

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2008
    Location
    San Francisco, CA
    Posts
    10

    Exclamation [FIXED-434] 0.97: Ext.data.Reader "this.getTotal is not a function" error

    Just upgraded to 0.97 and now getting this on my own code as well as the Twitter demo app (and I'm guessing any app using the Ext.data.Reader subclasses). This was all working with 0.96.

    I've got a Store bound to a JsonProxy (and a JsonReader). When the Store loads the error in Chrome (used for testing purposes) is:

    Uncaught TypeError: Object [object Object] has no method 'getTotal'
    readRecords ext-touch-debug.js:7899

    The error is caused in Ext.data.Reader (line 7899 in ext-touch-debug.js)) in this code:

    if (this.totalProperty) {
    value = parseInt(this.getTotal(data), 10);
    if (!isNaN(value)) {
    total = value;
    }
    }

    The reader is being passed a model. I've also tried setting the totalProperty (was set to nothing) but no change.

  2. #2

    Default

    +1

    i'm using the default jsonreader in a jsonproxy and i'm also getting this error.
    i confirm it was working in .96.

    do we need to change any configurations of the reader or proxy or is this a bug?

  3. #3
    Sencha User BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534

    Default

    Thanks for the bug report.

  4. #4
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    I've only seen this before when the model wasn't set correctly on the Reader - can you show me your code and what happens when you run console.log(reader.model) ?
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  5. #5
    Touch Premium Member
    Join Date
    Feb 2008
    Posts
    7

    Default Twitter issue on 0.97

    Same error in Twitter example and other applications that are using DataView.

  6. #6
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Ok thanks - confirmed the bug in Twitter example and fixed the source. This should behave correctly as of the next release
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Sencha User
    Join Date
    Feb 2011
    Posts
    4

    Post This.getTotal is not a function ExtJS 4

    Just upgraded to 4.0 and now getting this Errore,
    It was working in 3.3.1

    this is my code :

    function () {
    try {
    var ColorStore = new Ext.data.Store({
    autoLoad:
    true,
    proxy:
    new Ext.data.HttpProxy({
    url:
    'ComboBoxLoader.aspx',
    method:
    'GET'
    }),
    reader:
    new Ext.data.JsonReader(
    {
    root:
    'root',
    id:
    'idCmb',
    fields: [{ name:
    'Number', type: 'string', Mapping: 'Number' },
    { name:
    'Adress', type: 'string', Mapping: 'Adress'}]
    }
    )
    });
    ?
    ColorStore.load();
    var combo = new Ext.form.ComboBox({

    id:
    'combo',
    displayField:
    'Adress',
    typeAhead:
    true,
    mode:
    'local',
    triggerAction:
    'all',
    store: ColorStore,
    emptyText:
    'Inserire...',
    selectOnFocus:
    true,
    width: 135,
    iconCls:
    'no-icon'

    ?
    });


    Any Idea?


  8. #8
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    What was the error it gives you? The current release is 4.0PR1 and is expected to contain some bugs - I don't think I communicated that very clearly in the blog post.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  9. #9
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    17

    Default

    It seems that in v4, 'mode' is deprecated and instead 'queryMode' should be used.

    I had the same problem and the docs showed me the correct params. If you are trying to fetch from a remote store, I think 'local' is NOT what you want...

    Jon

Similar Threads

  1. Replies: 7
    Last Post: 30 Sep 2010, 10:42 AM
  2. Replies: 2
    Last Post: 20 Jan 2010, 10:50 AM
  3. [FIXED][3.0.0] Error on new Ext.data.JsonReader()
    By excelsis in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 21 Jul 2009, 1:19 PM
  4. Replies: 2
    Last Post: 4 Jun 2009, 1:24 AM
  5. Form reader Error when no data retrive
    By leshcoff in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 30 Jul 2007, 4:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •