Let's log on!
It is now time to enable our controllers and test the functionality. Update the Application.js
file as displayed in the following code:
Ext.define('TTT.Application', { name: 'TTT', extend: 'Ext.app.Application', requires: ['TTT.view.Viewport', 'TTT.view.LogonWindow'], models: ['User'], controllers: ['MainController', 'UserController'], stores: ['User'], init: function(application){ TTT.URL_PREFIX = 'ttt/'; Ext.Ajax.on('beforerequest', function(conn, options, eOpts){ options.url = TTT.URL_PREFIX + options.url; }); }, launch: function() { var me = this; TTT.console = function(output) { if (typeof console !== 'undefined') { console.info(output); } }; me.logonWindow = Ext.create('TTT.view.LogonWindow'); me.logonWindow.show(); }, doAfterLogon: ...
Get Enterprise Application Development with Ext JS and Spring 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.