View Full Version : Application becoming undefined on page refresh

16 May 2014, 11:08 AM
I am currently upgrading my Ext JS app from 4.0.2 to 4.2.1, most things that broke were easy fixes but for some reason if I am on a particular page.. say "/user/edit/203" which opens the edit form page of user with id 203. If I refresh this page it will make my application become undefined even though in the 4.0.2 version of my app I set it up in the same way and it worked just fine. My app.js is called every refresh so I don't understand why it would become undefined.


var TestApplication;

Ext.onReady(function() {

TestApplication = new Ext.app.Application({
name: 'TestApp,
appFolder: 'jsmvc',
controllers: ["BaseController",

enableQuickTips: true,

launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
xtype: 'container',
id: 'homecontainer',
autoDestroy: true,
region: 'center',
layout: 'fit'


Every history change I call a method that tracks the token and finds the appropriate controller for the page requested. But when the app looks for that controller from the TestApplication variable it's undefined. I'm not sure why this is happening.. does any have any ideas?

19 May 2014, 8:24 AM
First thing is why are you using Ext.onReady when you should be using Ext.application:

name : 'TestApp',
appFolder : 'jsmvc',