1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    68
    Answers
    3
    Vote Rating
    1
    slngr is on a distinguished road

      0  

    Question Answered: Ext.DataView - Uncaught TypeError

    Answered: Ext.DataView - Uncaught TypeError


    Hi,

    me again with new errors. I declared my DataView like this (like it's shown in doc example):

    Code:
    Ext.define('App.view.HomeDataView', {    extend: 'Ext.DataView',    xtype: 'home_dataview',
            
        config: {
    
    
    
    
            defaults: {
                //styleHtmlContent: true
            },
          
            // Store declaration for tile data
            store: {
              fields: ['id', 'name', 'img_url'], 
              data: [
                {id: 'tile1', name: 'Blog', img_url: 'img/thumbnail.png'},
                {id: 'tile2', name: 'Style Filter', img_url: 'img/thumbnail.png'}
              ] 
            },
            
            itemTpl: '<h1>{name}</h1>'
        },
    
    
    
    
        initialize: function() {
            console.log('>> Home_DATA_VIEW [created]');
            this.callParent();
        },
    });
    and get the following error:

    Code:
    Uncaught TypeError: Object [object Object],[object Object] has no method 'each'
    Any idea what's wrong in my declaration? Getting this error when I want to open the DataView via a button - something like -> onButtonTap: view.push('dataViewXtype');
    Is that forbidden?

    Thank you!

  2. Fixed the problem - after being blind yesterday night, I add some brackets ("[","]") today to the store item.

  3. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    68
    Answers
    3
    Vote Rating
    1
    slngr is on a distinguished road

      0  

    Default


    Fixed the problem - after being blind yesterday night, I add some brackets ("[","]") today to the store item.