Book Image

Mastering ExtJS - Second Edition

By : Loiane Avancini
Book Image

Mastering ExtJS - Second Edition

By: Loiane Avancini

Overview of this book

Table of Contents (19 chapters)
Mastering Ext JS Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Ext JS routing


Routing is a capability introduced in Ext JS 5 that makes the process of handling history using the Ext.util.History class in the application easier.

On a normal website, a user navigates to and from different pages as they click links or fill out forms. However, in a single-page application, a user's interaction doesn't load a new page. Instead, it is handled within a single page and components react to that interaction. So how do we still allow users to use the browser's forward and back buttons? Using routes allows the user to use this capability by mapping hash tokens to controller methods.

For example, we have a screen to manage the Films information. Using routing, we can allow the user to access this screen (if the user has proper entitlements) and automatically selects a particular row of the Films grid by accessing https://localhost/masteringextjs/#films/3. When the user accesses this link, we can instruct the application to open the Films tab and select the row of...