PDA

View Full Version : Can ExtJs4 modules co-exist with ExtJs3?



chandrakanth.bairy
29 Oct 2012, 9:50 PM
Hi,
I have to build an ExtJs4 module within an ExtJs3 application.
How can I build it where the particular module should download ExtJs4 classes rather than ExtJs3 classes?
My module will be like one of the items of a ExtJs3 Panel.
So, when this item is downloaded it should download ExtJs4 libraries and classes.
Thanks,
Chandrakanth.

James Goddard
30 Oct 2012, 5:10 AM
You can sandbox 4 within a 3 app: http://docs.sencha.com/ext-js/4-1/#!/example/sandbox/sandbox.html.

Not sure where you are going with downloading libraries. ExtJS 3 does not support dynamic loading so it's not automatically downloading your new component. You'd have to link to BOTH sets of libraries.

chandrakanth.bairy
30 Oct 2012, 5:23 AM
Thanks James.
I could manage to call my ExtJs4 component within ExtJs3 Panel. But, I came across an error when the ExtJs3 panel gets added with ExtJs4 panel. Like,

Uncaught TypeError: Object [object Object] has no method 'addClass' ext-all-debug.js:19240 (http://localhost:8088/panajax/ext/ext-all-debug.js)

Ext.layout.ContainerLayout.Ext.extend.configureItemext-all-debug.js:19240 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.ContainerLayout.Ext.extend.renderItemext-all-debug.js:19212 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.ContainerLayout.Ext.extend.renderAllext-all-debug.js:19202 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.ContainerLayout.Ext.extend.onLayoutext-all-debug.js:19188 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.AnchorLayout.Ext.extend.onLayoutext-all-debug.js:19693 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.AbsoluteLayout.Ext.extend.onLayoutext-all-debug.js:21882 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.layout.ContainerLayout.Ext.extend.layoutext-all-debug.js:19182 (http://localhost:8088/panajax/ext/ext-all-debug.js)
Ext.Container.Ext.extend.doLayoutext-all-debug.js:18890 (http://localhost:8088/panajax/ext/ext-all-debug.js)
showModulesv.reports.js:291 (http://localhost:8088/panajax/modules/sv.reports.js)
(anonymous function)ext-base.js:7 (http://localhost:8088/panajax/ext/adapter/ext/ext-base.js)
Ext.Button.Ext.extend.onClickext-all-debug.js:44527 (http://localhost:8088/panajax/ext/ext-all-debug.js)
h

Above, error occurs at configureItem method of Ext.layout.ContainerLayout
class. Extjs4 component has addClass method deprecated and the configureItem method is called for Extjs3 component.Do I need to add a check for Extjs4 component?