Results 1 to 3 of 3

Thread: ArrayStore reader problem?

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Vote Rating

    Default ArrayStore reader problem?

    I have just encountered an issue after switching to the PR4 code where one of my stores does not seem to be reading the array data that I pass into it correctly.

    Some code:

    Ext.define('PinpointersTouch.model.History', {
        extend: '',
        config: {
            fields: [
    Ext.define('', {
        extend: '',
        requires: 'PinpointersTouch.model.History',
        config: {
            model: 'PinpointersTouch.model.History'
    I have a List bound to the store above and configured with an itemTpl like so:

    Ext.define('PinpointersTouch.view.JourneySummaryView', {
        extend: 'Ext.dataview.List',
        xtype: 'journeysummaryview',
        selectedUntID: null,
        selectedStartDT: null,
        selectedEndDT: null,
        config: {
            itemTpl: new Ext.XTemplate(
                '<ul id="unitList">',
                    '<tpl for=".">',
                            '<table width="100%" cellspacing="0">',
                                    '<td style="width:16px;height:16px"><div class="{iconCls}" style="width:16px;height16px;"></div></td>',
                            '<div class="journeyCurrentLocation">{description}</div>',
            store: 'History',
            items: [{
                xtype: 'toolbar',
                docked: 'bottom',
                ui: 'light',
                items: [{
                    xtype: 'button',
                    itemId: 'btnSelectCriteria',
                    text: 'Select Criteria...'
                    xtype: 'label',
                    html: 'Show:',
                    style: 'color:white;',
                    itemId: 'labelShow'
                    xtype: 'selectfield',
                    store: 'TrackingList',
                    displayField: 'UnitName',
                    valueField: 'UntID',
                    itemId: 'historyUnitSelect'
                    xtype: 'datepickerfield',
                    value: new Date(),
                    format: 'd-M-Y',
                    width: 150,
                    itemId: 'historyDateSelect'
                    xtype: 'button',
                    itemId: 'btnGetHistory',
                    iconCls: 'download',
                    iconMask: true

    I am loading the store using setData and passing in array of items, which appear like so.
    • 0: {,}
      • DistanceTravelledMetres: 286
      • IdlingTimeSecs: null
      • MinZoom: 10
      • SpeedKmh: null
      • TravelTimeSecs: 34
      • UpmIDs: null
      • UrrID: null
      • children: []
      • description: "286 metre journey from Weston Road, Long Ashton, North Somerset to Long Ashton Road, Long Ashton, North Somerset. Max speed acheived was 29mph. Used 0.05 litres of fuel. Odometer reading is 1550 miles."
      • eventDT: "10 Jan 14:37:40"
      • expanded: false
      • heading: null
      • iconCls: "Icon16 Urr12"
      • id: "j34017278"
      • lat: 51.42999
      • leaf: false
      • lon: -2.66071
      • mapIcon: 0
      • opplat: 51.42908
      • opplon: -2.66477
      • statusHTML: "<img src='' title='8.00% fuel'><img src='' title='Journey End'>"

    When the store loads, my list renders a bunch of empty rows with horizontal separators between them. When I inspect the store I can see from the data properties that its read the id values from the data fine, but all the other fields are empty strings. This was working in PR3 fine, I haven't touched this code since switching to PR4 so I am bit confused as to what could be causing this.

    Any clues please?

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Vote Rating


    I have been debugging through this issue further and notice in the buildFieldExtractors function of the Reader class there is a call to getMapping(), see line 16563 in the debug file.

    This getMapping() definition does not seem to be defined anywhere in the source.

    So I suspect this is why my List component doesnt show any data as the field mappings dont seem to be resolving.


  3. #3
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Vote Rating


    Could you provide us with a simple testcase which we can reproduce easily please?

    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Posting Permissions

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