When we implemented the success
function in the Submit button listener on the Login Controller, we mentioned the Packt.view.MyViewport
class. We are going to create this class now (as a new file named MyViewport.js
under the view
folder). Before we start, let's take a look at what is going to be the output:
Now, let's a look at the code that is going to generate the previous output:
Ext.define('Packt.view.MyViewport', { extend: 'Ext.container.Viewport', // #1 alias: 'widget.mainviewport', // #2 requires: [ 'Packt.view.Header' // #3 ], layout: { type: 'border' // #4 }, items: [ { xtype: 'container', // #5 width: 185, collapsible: true, region: 'west', style: 'background-color: #8FB488;' }, { xtype: 'appheader', // #6 region: 'north' }, { xtype: 'container', // #7 region...