Dear All

i trying develop simple aplication using MVC Architecture using extjs 4.2, my problem is, if i call controller firt time it running but if i call same controller again i got the error "Uncaught TypeError: Cannot read property 'buffered' of undefined"

please tell me the true way using store, grid on controller and this is my code

i call dinamic controller from this code (please look at btnClicked:function(btn, e, eOpts))
Code:
Ext.define('IFO.controller.ifodashboard', {     
    extend: 'Ext.app.Controller',                 
    
    requires: [                 
        'Ext.Ajax'
    ],
    
    views: [
        'dashboard.viewheader',
        'dashboard.viewtoolbar',
        'dashboard.viewstatusbar',
        'dashboard.viewdashboard'
    ],
    
    init: function() {
        this.control({      
            'apptoolbar button[action=btnClicked]': {
                click: this.btnClicked
            },
            'apptoolbar menu [action=btnClicked]': {
                click: this.btnClicked
            }
        });
    },
    
    btnClicked:function(btn, e, eOpts){              
        if (btn.dataext.length<=0) return false;
        if (!btn.dataext.controller || !btn.dataext.xtype) return false;
        ifoViewPort.remove(Ext.getCmp('ifo-app-content'));  
        ifoApp.getController(btn.dataext.controller);      
        ifoViewPort.add({xtype:btn.dataext.xtype});   
    }        
    
});
and i call this controller
Code:
Ext.define('IFO.controller.system.iforoles', {     
    extend: 'Ext.app.Controller',                 
    
    requires: [                 
        'Ext.Ajax'
    ],
    
    views: [
        'system.v_panelroles',
        'system.viewgridroles',
        'system.viewtreegridmodules'
    ],      
    
    stores: [
        'system.storegridroles',
        'system.storetreegridmodules'  
    ],
    
    init: function() {
        this.control({     
            'viewgridroles button[action=addRecord]': {
                click: this.addRecord
            }, 
            'viewgridroles' : {
                rowSelected : this.rowSelected 
            }  
        });
    },
    
    addRecord:function(btn, e, eOpts){       
        var grid = btn.up('viewgridroles'); 
        grid.getStore().insert(0, Ext.create('INFOOKUS.model.system.modelgridroles'));   
    },
    
    rowSelected:function(grid, record, index, eOpts) {            
        var treeModStore = Ext.getCmp('id-viewtreegridmodules').getStore(); 
        treeModStore.getProxy().extraParams.role=record.get('id');
        treeModStore.getProxy().extraParams.flag='ROLE';
        treeModStore.load();       
    }
    
    
});
mydata store:
Code:
Ext.define('IFO.store.system.storegridroles', {
    extend:     'Ext.data.Store',         
    model:      'IFO.model.system.modelgridroles', 
    
    storeId: 'AdvSearchPost',
    autoDestroy :true,
    autoLoad:   true,
    autoSync:   true,
    remoteSort: true,         
    pageSize:   50, 
    
    requires: [                 
        'Ext.window.MessageBox'
    ], 
    
    proxy: {          
        type:   'ajax',        
        api: {                   
            read:       'roles',
            create:     'roles/add',
            destroy:    'roles/remove',
            update:     'roles/edit'
        },
        actionMethods: {
            create : 'POST',
            read   : 'POST',
            update : 'POST',
            destroy: 'POST'
        },
        writer: {
            type:   'json',
            method: 'POST',
            writeAllFields: false,
            writeRecordId : true,
            encode:         true,
            root:           'data',
            successProperty:    'success' 
        },
        reader: {
            type:               'json',
            root:               'data',
            idProperty:         'id',
            totalProperty:      'total',
            successProperty:    'success'
        },
        listeners: {
            exception: function (ajax, response, operation, eOpts) {  
                switch(response.status)
                {
                    case 401:
                        window.document.location.href=ifoBaseURL;    
                        return false;
                    break;
                    case 200:
                        var obj = Ext.JSON.decode(response.responseText);             
                        Ext.Msg.alert('Failure', obj.msg);     
                    break;
                    default:
                        Ext.Msg.alert(response.statusText, response.responseText);    
                }                                                                 
            }
        }        
    },
    
    listeners : {
        write:function( store, operation, eOpts ) {    
            if (operation.action=='write') store.loadRecords( operation.records );      
        },
        load : function ( store, records, successful, eOpts ) {
            Ext.getCmp('id-viewgridroles').getSelectionModel().deselectAll(); 
            var treeModStore = Ext.getCmp('id-viewtreegridmodules').getStore(); 
            treeModStore.getProxy().extraParams.role=0;
            treeModStore.getProxy().extraParams.flag='ROLE';
            treeModStore.load();  
        }
    }
    
});
and my grid is
Code:
Ext.define('IFO.view.system.viewgridroles', {
    extend:     'Ext.grid.Panel',
    alias:      'widget.viewgridroles',
                                     
    title:      'Roles',
    id:         'id-viewgridroles', 
    autoShow:   true,
    autoScroll: true,      
    region:     'west',
    width:      '30%',
    split:      true,       
    store:      'system.storegridroles',
    
    initComponent: function() {   
        
        this.columns = [     
            {                    
                xtype: 'checkcolumn',      
                header: '<img src="images/icons/small/lamp.png"/>',           
                dataIndex: 'publish',  
                tooltip :'PUBLISH', 
                hideable:false,
                menuDisabled:true,
                resizable:false,
                sortable:false,
                align:'center',  
                width:50
            },         
            {
                header: 'NAME', 
                dataIndex: 'name',
                flex: 1,
                editor: {                                             
                    allowBlank: false,
                    maxLength :255
                },
                filterable: true,
                filter: {
                    type: 'string'        
                }
            },      
            {
                header: 'NOTE', 
                dataIndex: 'note',
                flex: 1,
                editor: {                                             
                    allowBlank: true,
                    maxLength :255
                },
                filterable: true,
                filter: {
                    type: 'string'        
                }
            },
            {
              xtype:'actioncolumn',                           
              width:50,  
              align:'center',                                      
              hideable : false,
              menuDisabled : true,
              sortable :false,
              resizable :false,
              items: [
                  {
                      align:'center',         
                      tooltip :'DELETE',           
                      getClass: function(v, meta, rec, rowIndex, colIndex) {
                            return "icon-delete";
                      },
                      handler: function(grid, rowIndex, colIndex) {        
                            grid.store.removeAt(rowIndex);    
                      }
                  }
              ]
            }
        ];
        
        this.dockedItems = {
            xtype: 'pagingtoolbar',
            dock: 'bottom',
            store: 'system.storegridroles',
            displayMsg :'',
            emptyMsg :'',
            items: [
                '-',
                {
                    iconCls:'icon-plus',
                    text:'Add New',
                    action:'addRecord'
                }
            ],
            displayInfo: true,
        };
        
        this.plugins= Ext.create('Ext.grid.plugin.RowEditing',{clicksToEdit: 2, clicksToMoveEditor: 1, errorSummary :false});
        
        this.features = new Ext.create('Ext.ux.grid.FiltersFeature', {
            encode: true, 
            local: false
        });
        
        this.callParent(arguments);        
        this.addEvents('rowSelected');
    },
    
    listeners :{
        select: function( grid, record, index, eOpts ) {
            this.fireEvent('rowSelected', grid, record, index, eOpts);
        }
    }
    
});
my menu is


extjs.jpg
please help me..