1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    148
    Vote Rating
    2
    denisputnam is on a distinguished road

      0  

    Default chart loadData() issue in the Build a Car Store example

    chart loadData() issue in the Build a Car Store example


    I modified the example to use a Controller, but the row.data.quality is undefined. Can someone tell what I am doing wrong? It looks like the quality data is not loading.


    Ext.define('MyApp.controller.MyController', {
    extend: 'Ext.app.Controller',


    refs: [
    {
    ref: 'grid',
    selector: '#grid'
    },
    {
    ref: 'detail',
    selector: '#detail'
    },
    {
    ref: 'chart',
    selector: '#chart'
    }
    ],


    init: function(application) {
    this.control({
    '#grid': {
    itemclick: this.gridUpdate
    }
    });
    },


    gridUpdate: function(grid, row) {
    console.log( 'gridUpdate' );


    console.log( 'row=' + row );
    console.log( 'row.data=' + row.data );
    this.getDetail().update( row.data );
    console.log( 'row.data.quality=' + row.data.quality );
    //if( !row.data.quality )
    //{
    this.getChart().store.loadData( row.data.quality );
    //}
    //detail.update(row.data);
    //chart.store.loadData(row.data.quality);
    //view.down('#grid').onGridRowSelect( grid, row );
    }


    });

    This is part of the cars.json file:
    {
    data: [{
    manufacturer: 'Porsche',
    model: '911',
    price: 135000,
    wiki: 'http://en.wikipedia.org/wiki/Porsche_997',
    img: '2004_Porsche_911_Carrera_type_997.jpg',
    quality: [{name: 'overall', rating:1}, {name: 'mechanical', rating: 4}, {name: 'powertrain', rating: 2}, {name: 'body', rating: 4},{name: 'interior', rating: 3},{name: 'accessories', rating: 2}]
    },{
    manufacturer: 'Nissan',
    model: 'GT-R',
    price: 80000,
    wiki:'http://en.wikipedia.org/wiki/Nissan_Gt-r',
    img: '250px-Nissan_GT-R.jpg',
    quality: [{name: 'overall', rating:2}, {name: 'mechanical', rating: 3}, {name: 'powertrain', rating: 5}, {name: 'body', rating: 4},{name: 'interior', rating: 2},{name: 'accessories', rating: 2}]
    },{
    manufacturer: 'BMW',
    model: 'M3',
    price: 60500,
    wiki:'http://en.wikipedia.org/wiki/Bmw_m3',
    img: '250px-BMW_M3_E92.jpg',
    quality: [{name: 'overall', rating:3}, {name: 'mechanical', rating: 5}, {name: 'powertrain', rating: 3}, {name: 'body', rating: 4},{name: 'interior', rating: 5},{name: 'accessories', rating: 3}]
    },{
    manufacturer: 'Audi',
    model: 'S5',
    price: 53000,
    wiki:'http://en.wikipedia.org/wiki/Audi_S5#Audi_S5',
    img: '250px-Audi_S5.jpg',
    quality: [{name: 'overall', rating:4}, {name: 'mechanical', rating: 1}, {name: 'powertrain', rating: 1}, {name: 'body', rating: 4},{name: 'interior', rating: 1},{name: 'accessories', rating: 5}]
    },{
    Attached Files

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