-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering ExtJS - Second Edition - Second Edition
By :
The missing piece now is the ViewController, which will handle all the handlers and listeners declared in our code. We will split the code into two classes: the base.ViewController that contains generic code and can be reused, and the film.FilmsController that contains the code to handle specific details of the Films View.
Inside this class, we will put all the generic code that can be reused by other views that have the same behavior as the Films View. For example, editing or deleting a record by clicking on a button of a Widget Column opens the pop-up window. If the user clicks on the Add button, then close the pop-up window that is used to create or edit information.
The code for this class is presented as follows:
Ext.define('Packt.view.base.ViewController', {
extend: 'Ext.app.ViewController',
requires: [
'Packt.util.Util',
'Packt.util.Glyphs'
],
onAdd: function(button, e, options){ //#1
this.createDialog...
Change the font size
Change margin width
Change background colour