PDA

View Full Version : MVC including ext-all



chaostimmy
11 Jul 2012, 6:48 AM
Hi extjs mates :D
I'm trying to write an extjs4.1.1-rc2 application in the MVC way and I would like to use the "ext-all.js" so that the Ext.Loader does load ONLY my private classes dynamically not all EXT ones...

The problem is, that if I include the "ext-all.js", the application does not start anymore. It does only start if I do not include it and let the Loader dynamically load everything...

I hope I could make my problem clear...

Tim Toady
11 Jul 2012, 6:56 AM
You probably just need to enable the loader

Ext.Loader.setConfig({ enabled: true });

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Loader-method-setConfig (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.Loader-method-setConfig)

Alternatively, you can use mvc and for production use the sdk to minify everything so that it doesn't need dynamic loading.

chaostimmy
11 Jul 2012, 11:59 AM
Hi Toady,
yes I already do that. With an include of "ext.js" and not "ext-all.js" it works. But when I include the "ext-all.js" nothing does

Tim Toady
11 Jul 2012, 12:30 PM
Are there any errors you are receiving in your js console?

chaostimmy
11 Jul 2012, 1:31 PM
No errors and no logging messages from the launch function in the application

jratcliff
11 Jul 2012, 4:35 PM
Hi Toady,
yes I already do that. With an include of "ext.js" and not "ext-all.js" it works. But when I include the "ext-all.js" nothing does

Does this work for you in the pandora MVC example? I just tried it there and it worked for me. I tried in both Ext 4.1.0 and 4.1.1. I don't have a copy of 4.1.1-rc2 so I can't check there.

chaostimmy
16 Jul 2012, 10:00 AM
When I use the "simple" example in "extjs-4.1.1/examples/app/simple" I have the same "nothing happens" effect:



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title id="page-title">Account Manager</title>

<link rel="stylesheet" type="text/css" href="../../../resources/css/ext-all.css">

<!-- GC -->

<script type="text/javascript" src="../../../ext.js"></script>
<!-- don't use compiled version <script type="text/javascript" src="all-classes.js"></script> -->
<script type="text/javascript" src="../../../ext-all.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body>

</body>
</html>


I removed the compiled "all-classes.js" to use the uncompiled version and added the "ext-all.js" to make the loader not load any Ext classes which i really want.

chamacs
16 Jul 2012, 10:23 AM
You shouldn't have both ext includes in the html:

<script type="text/javascript" src="../../../ext.js"></script>... <script type="text/javascript" src="../../../ext-all.js"></script>
But I don't know if that causes the problem you're having.

chaostimmy
17 Jul 2012, 1:18 AM
You shouldn't have both ext includes in the html:

<script type="text/javascript" src="../../../ext.js"></script>... <script type="text/javascript" src="../../../ext-all.js"></script>
But I don't know if that causes the problem you're having.

oh nooo :s

that was the problem... didn't thought that! thank you very much