PDA

View Full Version : Views declaration in Controller not recognized (Firefox only)



echan
13 May 2011, 9:20 AM
Hi,

I have a problem using MVC on Firefox. It doesn't seem to be a problem in IE. In my Controller, I refer to my views as follows:


Ext.define(

'Pd.controller.canvas.MyController', {

extend: 'Ext.app.Controller',

views: [
'node.form.CustomerActivatedNodeForm'
]


};


My application is declared as follows, with the "Pd" namespace mapped to the "app" folder:



Ext.application({

name: 'Pd', // namespace
appFolder: 'app',
controllers: [
'canvas.MyController'
],


....<more stuff>....

}





The view referenced in the controller resides in the directory as:

/app/view/node/form/CustomerActivatedNodeForm.js





When my application loads, I hit this error:

An uncaught error was raised with the following data:ext-de...?v=2276 (line 7864)
classToLoad
"Pd.view.node.form.CommonNodeForm"loadPath
"Pd/view/node/form/CommonNodeForm.js"loadingType
"async"msg
"Failed loading 'Pd/view...fy that the file exists"sourceClass
"Ext.Loader"


First, I wanna know is, do I need to manually include the CommonNodeForm.js into my main .htm file, or is the framework supposed to automatically find and load any views I declare in a controller? I tried explicitly including and not including, but both cases give me the same error.


Why is it trying to load from the "Pd" directory? Shouldn't they look into the "app" directory? It seems my folder mapping is not recognized in the context of the controller.


Anyone knows what the problem is? Again, this only happens on Firefox, but not IE.


Eric.

echan
19 May 2011, 10:05 AM
I forgot to mention that my view CustomerActivatedNodeForm extends CommonNodeForm. I don't understand that on Firefox, why it's having problems loading CommonNodeForm.js. I did include that in my main .jsp file.

sskow200
19 May 2011, 11:14 AM
have you tried using the requires option in your controller? You may have to require all the necessary classes that you have extended.