Creating the ViewController

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.

The base ViewController

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 ...

Get Mastering Ext JS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.