0
votes

I have a grid with a normal store. Everything works fine, but as soon as i deploy my project with sencha cmd i get the error: Cannot read property 'isBufferedStore' of undefined .

I know that this error occurs when the store could not be located.

store:

Ext.define('Desktop.irregularPresence.store.irregularPresenceStore', {    
extend: 'Ext.data.Store',
id: 'irregularPresenceStore',
alias: 'widget.irregularPresenceStore',


requires: [
    'Desktop.irregularPresence.model.irregularPresenceModel',
    'Ext.data.proxy.Memory',
    'Ext.data.reader.Array'
],




model: 'Desktop.irregularPresence.model.irregularPresenceModel',
autoLoad:true,
//pageSize: 10,
proxy:
{
    type:'ajax',
    enablePaging: true,
    url:'php/json.php',
    headers: { 'Content-Type': 'application/json' },
    extraParams:{
        data : JSON.stringify({
            module : "irregularPresence",
            action : "load",
            jsonObject : null})
    },
    reader:{
        type:'json',
        rootProperty: 'Anfang'
    }
},


sorters: [{
        property : 'lastName',
        direction:'DESC'
}],

});

model:

Ext.define('Desktop.irregularPresence.model.irregularPresenceModel', {    extend: 'Ext.data.Model',
alias: 'widget.irregularPresenceModel',


id: 'irregularPresenceModel',
fields:
[
    {name:'id', type:'int'},
    {name:'fullName', type:'string'},
    {name:'type', type:'string'},
    {name:'datefrom', type:'string'},
    {name:'dateto', type:'string'}

]

});

view: Ext.define('Desktop.irregularPresence.view.irregularPresenceList', { extend: 'Ext.grid.Panel', alias: 'widget.irregularPresenceList', id: 'irregularPresenceList',

requires: [
     'Desktop.irregularPresence.store.irregularPresenceStore'
],


xtype: 'array-grid',
store: 'Desktop.irregularPresence.store.irregularPresenceStore',


collapsible: false,


listeners : {
    celldblclick: function(table, td, cellIndex, record, tr, rowIndex, e, eOpts) {
        this.fireEvent('LoadCellDblClick', rowIndex);
    }
},






initComponent: function () {
    var me = this;


    me.columns = [
        {
            text     : 'Name',
            dataIndex: 'fullName',
            flex: 1
        },
        {
            text     : 'Typ',
            dataIndex: 'type',
            flex: 1
        },
        {
            xtype: 'datecolumn',
            text     : 'Datum von',
            dataIndex: 'datefrom',
            format: 'd.m.Y',
            flex: 1
        },
        {
            xtype: 'datecolumn',
            text     : 'Datum bis',
            dataIndex: 'dateto',
            format: 'd.m.Y',
            flex: 1
        },
        {
                xtype: 'actioncolumn',
                width: 80,
                menuDisabled: true,
                items: [

                    {
                        icon: 'resources/images/tabs.gif',
                        tooltip: 'Abweichende Präsenz anzeigen',


                        handler: function(view, rowIndex, colIndex, item, e) {
                            this.fireEvent('viewIrregPresence', rowIndex);
                        }

                    },{
                        icon: 'resources/images/edit.png',
                        tooltip: 'Abweichende Präsenz bearbeiten',


                        handler: function(view, rowIndex, colIndex, item, e) {
                            this.fireEvent('editIrregPresence', rowIndex);
                        }
                    },
                    {
                        icon: 'resources/images/delete.gif',
                        tooltip: 'Abweichende Präsenz löschen',


                        handler: function(view, rowIndex, colIndex, item, e) {
                            this.fireEvent('deleteIrregPresence', rowIndex);
                        }
                    }
                ]
            }
    ];


    me.tbar = [{
                xtype: 'button',
                id:'irregPresence_btn_add',
                text:'Abweichende Präsenz hinzufügen',
                tooltip:'Abwesenheit oder spezial Anwesenheit hinzufügen',
                iconCls:'add',
                    handler:function(view, e){
                        this.fireEvent('AddirregularPresence', view, e);
                    }
    }];


    me.callParent();
}

});

app.js:

... controllers: [ 'Desktop.irregularPresence.controller.irregularPresenceController' ],

stores: [
    'Desktop.irregularPresence.store.irregularPresenceStore'
],

... });

1
What results does a search in the compiled app.js for Desktop.irregularPresence.store.irregularPresenceStore yield?Alexander

1 Answers

1
votes

I moved the store directly to the model and now its working.