Generic Controller for all tables
Now it is time to implement the last piece of the static data module. The goal is to implement a Controller that has the most generic code that will provide the functionalities for all the screens, without us having to create any specific method for any screens.
So let's start with the base of the Controller. We are going to create a new class named Packt.controller.StaticData
, as follows:
Ext.define('Packt.controller.StaticData', { extend: 'Ext.app.Controller', requires: [ 'Packt.util.Util', //#1 'Packt.util.Glyphs' ], stores: [ //#2 'staticData.Actors', 'staticData.Categories', 'staticData.Cities', 'staticData.Countries', 'staticData.Languages' ], views: [ //#3 'staticData.BaseGrid', 'staticData.Actors', 'staticData.Categories', 'staticData.Cities', 'staticData.Countries', 'staticData.Languages' ], init: function(application...