-
21 Jun 2012 1:44 PM #1
Answered: Ext.Application error dinamically loading files
Answered: Ext.Application error dinamically loading files
Hello!
I'm building an app using Sencha Touch inside a Lotus Notes database and I'm experiencing a strange problem.
I've managed to get the basic app to work perfectly until I tried to apply some MVC to it.
While I was using only "app.js" file with all the code (models, views and etc.) inside it, it works normally. The problem happens when I try to split those things in separate files, and leaving the "app.js" file like below:
Code:Ext.Loader.setConfig({ enabled: true }); Ext.application({ models: [ 'Requests' ], stores: [ 'ReqPending' ], views: [ 'ReqDetails', 'MainPanel' ], name: 'DPAS', launch: function() { Ext.create('DPAS.view.MainPanel', {fullscreen: true}); } });
Then I got the following error:
21-06-2012 18-00-35.jpg
I've noticed that the code automatically adds a parameter "_dc=1340303380364" while trying to load the file and this is causing an error 400 Bad Request.
What should I do?
I don't want to throw away MVC structure and have to deal with a terrible huge "app.js" file.
Thanks in advance for your help!
-
Best Answer Posted by mitchellsimoens
Your server cannot handle that? What web server are you using? Apache handles it fine for me. YOu can remove it by doing:
You can also try adding ?breakpoint to the url when you launch your app. This won't be an issue in production build as you won't be loading file dynamically.Code:Ext.Loader.setConfig({ disableCaching : false });
-
24 Jun 2012 1:53 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
Your server cannot handle that? What web server are you using? Apache handles it fine for me. YOu can remove it by doing:
You can also try adding ?breakpoint to the url when you launch your app. This won't be an issue in production build as you won't be loading file dynamically.Code:Ext.Loader.setConfig({ disableCaching : false });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Jun 2012 5:43 AM #3
Thanks for your help, this solved the problem.
I'm not using any web-server. The Sencha app is built inside a Lotus Notes database.


Reply With Quote