Controlling our user views
The glue that links the three user views together is the UserController
. It is here that we place all logic for managing user maintenance. You have seen that each view defined earlier is dumb in that there is only presentation logic defined. Actions, validations, and selections are all handled within the UserController
and are explained in the following code:
Ext.define('TTT.controller.UserController', { extend: 'Ext.app.Controller', views: ['user.ManageUsers'], refs: [{ ref: 'userList', selector: 'manageusers userlist' }, { ref: 'userForm', selector: 'manageusers userform' }, { ref: 'addUserButton', selector: 'manageusers #addUserBtn' }, { ref: 'saveUserButton', selector: 'manageusers userform #saveBtn' }, { ref: 'deleteUserButton', selector: 'manageusers userform #deleteBtn' }, { ref: 'userFormFieldset', selector: 'manageusers userform...