-
24 Jan 2013 8:10 AM #1
[4.2.0 RC 1] class loading behavior changed?
[4.2.0 RC 1] class loading behavior changed?
I am migrating 4.1 to 4.2 and class loading is not working for me. It used to be that requires:[] will be loaded by stripping application name space and adding Application.appFolder. Now application namespace is kept in URL and appFolder entirely ignored.
Is it expected behavior?
For example
fails with errorCode:Ext.application({ name: 'eContracts', requires: [ 'eContracts.util.StringUtil', 'eContracts.util.LangUtil', 'eContracts.view.Viewport' ], appFolder: 'app', .....
Code:" "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/util/LangUtil.js?_dc=1359043121740" "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/util/StringUtil.js?_dc=1359043121739" "NetworkError: 404 Not Found - https://localhost/ec-proto/eContracts/view/Viewport.js?_dc=1359043121741" My directory structure is: /app/Application.js /app/util/LangUtil.js /app/view/... ....
-
24 Jan 2013 8:24 AM #2
Sorry path is
/Application.js (my app.js)
/app/util/LangUtil.js
/app/view/...
I tried
paths:{
'eContracts':'./app'
},
did not help
-
24 Jan 2013 8:49 AM #3
it only affects app
it only affects app
I resolved by removing all requires from Ext.application({}). I guess it is timing issue - it starts resolving dependencies before Ext.Application is fully configured and had chance to configure ClassManager
-
24 Jan 2013 5:31 PM #4
RC1?
Where can I grab it?UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
24 Jan 2013 5:57 PM #5
you must be have support subscription,, then you can grab it from nightly builds
-
24 Jan 2013 6:13 PM #6
-
28 Jan 2013 11:27 AM #7
4.2 RC1 ??
4.2 RC1 ??
The latest 4.2 nightly build version I see is ext-4.2.0-20130127-beta.zip. I do not see any RC1 for 4.2 yet. Is 4.2 RC1 out ?
-
28 Jan 2013 11:28 AM #8
-
28 Jan 2013 12:38 PM #9
I also noticed a slight change coming from 4.0.7 app tests I had to get them working in 4.2 but it wasn't much on my end. Changes for 4.2.0 is commented.
Here is a snippet of my 4.0.7 arch-app.js:
And here is the same under 4.2.0 Beta 2 (I haven't tried the nightly yet):PHP Code:Ext.Loader.setConfig({
enabled: true,
paths: {
'MyApp': '.',
'Ext.ux.form': './js-4.0.7/plugin',
'Ext.ux': './js-4.0.7/plugin'
}
});
Ext.application({
name: 'MyApp.arch',
appFolder: 'js-4.0.7/arch',
requires: [
'MyApp.arch.Init',
'MyApp.arch.Ajax'
]
});
My directory structure is below:PHP Code:Ext.Loader.setConfig({
enabled: true,
paths: {
//Added the /js-4.2.0 to the relative path from the current html page location.
//My arch-app.js is in js-4.2.0 directory but the html page is located in the parent directory.
'MyApp': './js-4.2.0',
'Ext.ux.form': './js-4.2.0/plugin',
'Ext.ux': './js-4.2.0/plugin'
}
});
Ext.application({
name: 'MyApp.arch',
//Added the ./ in front of this path so it's relative path from current html page location.
appFolder: './js-4.2.0/arch',
requires: [
'MyApp.arch.Init',
'MyApp.arch.Ajax'
]
});
Of course I only use dynamic loading on the local machine for developers. We are currently building the sencha cmd into our build process using ant. But this is all I changed to get it working for me. If yours is working with beta 2 let me know and I will update ours to the nightly build to see what the difference is.Code:/ (webroot) index.html js-4.2.0/ arch-app.js arch/ Init.js Ajax.js


Reply With Quote
