Book Image

Mastering Ext JS

By : Loiane Groner
Book Image

Mastering Ext JS

By: Loiane Groner

Overview of this book

<p>Ext JS 4 is a JavaScript framework that provides you with the resources to build multi-browser, high-performance, and rich Internet applications.<br /><br />Mastering Ext JS is a practical, hands-on guide that will teach you how to develop a complete application with Ext JS. You’ll begin by learning how to create the project’s structure and login screen before mastering advanced level features such as dynamic menus and master-detail grids, before finally preparing the application for production.<br /><br />Mastering Ext JS will help you to utilize Ext JS to its full potential and will show you how to create a complete Ext JS application from the scratch, as well as explaining how to create a Wordpress theme.</p> <p><br />You will learn how to create user and group security, master-detail grids and forms, charts, trees, and how to export data to excel including PDF and images, always focusing on best practices.</p> <p><br />You will also learn how to customize themes and how to prepare the application to be ready for deployment upon completion. Each chapter of the book is focused on one task and helps you understand and master an individual aspect of the application.</p> <p><br />By the end of the book, you will have learned everything you need to know to truly master Ext JS and to start building advanced applications.</p>
Table of Contents (20 chapters)
Mastering Ext JS
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Adding and editing a new user


Now that we are capable of listing all the users from the application, we can implement add and edit capability. But before we start adding new event listeners to the controller, we need to create the new view that we are going to display to the user to edit or add a new user.

Creating the edit view – a form within a window

This new view is going to be a window, since we want to display it as a popup, and inside this window we will have a form with the user's information, and then we will have a toolbar at the bottom with two buttons: Cancel and Save. It is very similar to the login window that we developed on Chapter 2, The Login Page, but we will add new capabilities to this new form, such as form upload and also a file preview using the new HTML 5 features.

So let's get started and create a new class named Packt.view.security.Profile that is going to extend from the Window class:

Ext.define('Packt.view.security.Profile', {
    extend: 'Ext.window.Window',
  ...