1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    ryammanuru is on a distinguished road

      0  

    Default Unanswered: Array store not mapping raw data to fields

    Unanswered: Array store not mapping raw data to fields


    Hi,

    I just started on Ext JS and this is my first example with Arraystore. I have a servlet returning data as below.

    Code:
    [
      ["197_170",197,170,-18.4,-21.1,28,14.1,3.3,null,null,"1",null,5,7,"320.941_B",1]
    ]
    When I associate grid with store, I can only see zeroes. Can anyone help me in resolving this?

    Thanks,
    --Rajani

    Code:
    Ext.define('customData', {
        extend: 'Ext.data.Model',
        fields: [{
            name: 'deviceId',
            type: 'string'
        }, {
            name: 'XId100um',
            type: 'float'
        }, {
            name: 'YId100um',
            type: 'float'
        }, {
            name: 'XPosMm',
            type: 'float'
        }, {
            name: 'YPosMm',
            type: 'float'
        }, {
            name: 'RMm',
            type: 'float'
        }, {
            name: 'dieHeightMm',
            type: 'float'
        }, {
            name: 'dieWidthMm',
            type: 'float'
        }, {
            name: 'dieRow',
            type: 'int'
        }, {
            name: 'dieCol',
            type: 'int'
        }, {
            name: 'dieType',
            type: 'string'
        }, {
            name: 'barSuffix',
            type: 'string'
        }, {
            name: 'gridRow',
            type: 'int'
        }, {
            name: 'gridCol',
            type: 'int'
        }, {
            name: 'chipDesignId',
            type: 'string'
        }, {
            name: 'sectionNum',
            type: 'int'
        }] );
    
    var store = Ext.create('Ext.data.ArrayStore', {
        proxy: {
            type : 'ajax',
            url: 'diegrid.action'
        }, 
        model: 'customInfo'
    });
    
    Ext.create('Ext.grid.Panel', {
        title: 'customInfo',
        store: store,
        columns: [{
            header: 'deviceId',
            dataIndex: 'deviceId'
        }, {
            header: 'XId100um',
            dataIndex: 'XId100um'
        }, {
            header: 'YId100um',
            dataIndex: 'YId100um'
        }, {
            header: 'XPosMm',
            dataIndex: 'XPosMm'
        }, {
            header: 'YPosMm',
            dataIndex: 'YPosMm'
        }, {
            header: 'RMm',
            dataIndex: 'RMm'
        }, {
            header: 'dieHeightMm',
            dataIndex: 'dieHeightMm'
        }, {
            header: 'dieWidthMm',
            dataIndex: 'dieWidthMm'
        }, {
            header: 'dieRow',
            dataIndex: 'dieRow'
        }, {
            header: 'dieCol',
            dataIndex: 'dieCol'
        }, {
            header: 'dieType',
            dataIndex: 'dieType'
        }, {
            header: 'barSuffix',
            dataIndex: 'barSuffix'
        }, {
            header: 'gridRow',
            dataIndex: 'gridRow'
        }, {
            header: 'gridCol',
            dataIndex: 'gridCol'
        }, {
            header: 'chipDesignId',
            dataIndex: 'chipDesignId'
        }, {
            header: 'sectionNum',
            dataIndex: 'sectionNum'
        }],
        height: 500,
        renderTo: Ext.get('mygrid')
    });
                    
    store.load();
    Last edited by skirtle; 22 Dec 2011 at 10:10 PM. Reason: Added CODE tags

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Please use [CODE] tags when posting code.

    You've defined a model called customData but on the store your model config is set to customInfo.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar