PDA

View Full Version : Migration to extjs 4



raiwinashu
27 Jun 2012, 1:32 AM
Hi
I'm trying to migrate my app from extjs 2.2 to extjs4.0 .I need help regarding using namespaces



Ext.namespace('Ext.hpm');
Ext.hpm.ManageAcknowledgementPanel=Function(id){----------------------------------};


Is Ext.namespace usage is valid in extjs4? If not how i can i replace it?

Thanks in advance
Ashwin

börn
27 Jun 2012, 2:34 AM
It's valid, also it's not needed in most cases anymore. The shorthand besides is Ext.ns(..).

If you want to encapsule functions with a static-like access you can define ext4 classes and make a singleton:true on them... in fact every class you define with Ext.define creates its own namespace if it's not already there: e.g. Ext.define('App.your.funky.classpath.YourClass', {config...});

Before ext4 you should create a namespace for 'App.your.funky.classpath'. This is not needed anymore.

börn
27 Jun 2012, 2:35 AM
and instead of Function you should use function(id) = {...}; ;)

Himansu
20 Jul 2012, 6:30 AM
Hi All,

I have a problem with migrating the existing extjs 2 or 3 to extjs 4. Could some one help me out in this.


We have used extjs 4 and trying to convert my code into it.
But, none of the controls are loading while converting. Except the aspx master page.


Need someone to help us in this regard ASAP.



Thanks,
Suresh.