O'Reilly logo

Enterprise Application Development with Ext JS and Spring by Gerald Gierer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the Logon and Viewport actions

We are now ready to define the MainController that will be used to process the core application actions. These include logging on, logging off, and clicking on the header buttons to display the different management panels in the main content area.

The MainController.js file

The MainController.js definition is as the following code:

Ext.define('TTT.controller.MainController', { extend: 'Ext.app.Controller', requires: ['Ext.window.MessageBox'], views: ['TTT.view.MainHeader', 'TTT.view.MainCards', 'TTT.view.LogonWindow'], refs: [{ ref: 'mainCards', selector: 'maincards' }, { ref: 'usernameField', selector: 'logonwindow textfield[name=username]' }, { ref: 'passwordField', selector: 'logonwindow textfield[name=password]' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required