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

Client-side activity monitor


Let's enhance our application a little bit more. It is very important to let the users know that web applications have a timeout and they cannot leave it open all day long—mainly for security reasons. Server-side languages also have a timeout. Once the user is logged in, the server will not be available forever. This is for security reasons. That is why we need to add this capability to our application as well.

We are going to use a plugin to do this. The plugin is called Packt.util.SessionMonitor and is based on the Activity Monitor plugin from the Sencha Market (https://market.sencha.com/extensions/extjs-activity-monitor). After an interval (a default of 15 minutes of inactivity), the plugin will display a message to the user asking whether the user wants to keep the session alive. If yes, then it will send an Ajax request to the server to keep the server session alive. If the user does not do anything after the message is displayed for 60 seconds, the application...