ExtJS 4 MVC - How To Access Store From Controller?

Posted By Vitaliy | March 24, 2012 | ExtJS 4.0.7
0 4669
Reply to thread

Js Code

Ext.define('App.controller.Books', {
	extend: 'Ext.app.Controller',
	stores: ['Books'],
	init: function () {
		this.getBooksStore().loadData([
			{ id: 1, title: 'title 1', author: 'author 1' },
			{ id: 2, title: 'title 2', author: 'author 2' },
			{ id: 3, title: 'title 3', author: 'author 3' },
			{ id: 4, title: 'title 4', author: 'author 4' }
		]);
	}
});