1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    398
    Vote Rating
    2
    parky128 is on a distinguished road

      0  

    Default ArrayStore reader problem?

    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:

    Code:
    Ext.define('PinpointersTouch.model.History', {
        extend: 'Ext.data.Model',
        config: {
            fields: [
                'id',
                'leaf',
                'description',
                'iconCls',
                'TravelTimeSecs',
                'DistanceTravelledMetres',
                'IdlingTimeSecs',
                'MinZoom',
                'lat',
                'lon',
                'opplat',
                'opplon',
                'eventDT'
            ]
        }
     
    });
    Code:
    Ext.define('PinpointersTouch.store.History', {
        extend: 'Ext.data.ArrayStore',
        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:

    Code:
    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=".">',
                        '<li>',
                            '<table width="100%" cellspacing="0">',
                                '<tr>',
                                    '<td style="width:16px;height:16px"><div class="{iconCls}" style="width:16px;height16px;"></div></td>',
                                    '<td>&nbsp;{eventDT}</td>',
                                '</tr>',
                            '</table>',
                            '<div class="journeyCurrentLocation">{description}</div>',
                        '</li>',
                    '</tpl>',
                '</ul>'),
            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='http://connect.pinpointers.com/Images/icon-fuel010.gif' title='8.00% fuel'><img src='http://connect.pinpointers.com/Images/icon-ignitoff.2.gif' title='Journey End'>"
      [/CODE]

    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
    Posts
    398
    Vote Rating
    2
    parky128 is on a distinguished road

      0  

    Default


    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.

    Bug??

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


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

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

Thread Participants: 1

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