0

我有一个普通商店的网格。一切正常,但是一旦我使用 sencha cmd 部署我的项目,我就会收到错误:无法读取 undefined 的属性“isBufferedStore”。

我知道当找不到商店时会发生此错误。

店铺:

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'
}],

});

模型:

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'}

]

});

视图:Ext.define('Desktop.irregularPresence.view.irregularPresenceList',{ 扩展:'Ext.grid.Panel',别名:'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();
}

});

应用程序.js:

...控制器:['Desktop.irregularPresence.controller.irregularPresenceController'],

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

... });

4

1 回答 1

1

我将商店直接移到模型上,现在它可以工作了。

于 2014-09-02T11:44:59.777 回答