मैं (मेरे साथ नंगे) कारण मिल गया है:
https://docs.sencha.com/extjs/6.0/6.0.2-classic/source/Controller2.html#Ext-app-Controller
नज़र में:
onClassExtended -> Controller.resolveNamespace -> Ext.app.getNamespace
नामस्थान हल होने के बाद वे महत्वपूर्ण हैं, निर्भरताओं को संसाधित करने के लिए एक कॉल है:
Controller.processDependencies(proto, requires, namespace, 'store', data.stores);
मैं इस पर शोध किया और Ext.app.getNamespace ext 5 और 6
तो क्यों ExtJs 5
Ext.getNamespace("MyApp.controller.SomeController"); // returns MyApp
में यह है में और ExtJs 6 पर समान होता है
Ext.getNamespace("MyApp.controller.SomeController"); // returns MyApp.controller
कारण कंसोल द्वारा पाया जाता है।लॉग इन करें Ext.ClassManager.paths
वहाँ अब एक नई प्रविष्टि कि MyApp.controller
से मेल खाती है कि पहले वहाँ MyApp.controller (ZHT.controller) के लिए कोई कुंजी
था और क्या Ext.getNameSpace है देखने के लिए है ' गहरी उपसर्ग 'आप यहाँ देख http://docs.sencha.com/extjs/6.0/6.0.2-classic/source/Util.html#Ext-app-Util
[अद्यतन] तो एक बात यह है कि किया जा सकता है इस तरह स्थिर विधि resolveNamespace ओवरराइड करने के लिए है के रूप में कर सकते हैं:
statics: {
resolveNamespace: function(cls, data) {
var Controller = Ext.app.Controller,
namespaceRe = cls.prototype.isProfile ? Controller.profileRegex : Controller.controllerRegex,
className, namespace, match;
/*
* Namespace resolution is tricky business: we should know what namespace
* this Controller descendant belongs to, or model/store/view dependency
* resolution will be either ambiguous or plainly not possible. To avoid
* guessing games we try to look for a forward hint ($namespace) that
* Application class sets when its onClassExtended gets processed; if that
* fails we try to deduce namespace from class name.
*
* Note that for Ext.app.Application, Controller.onClassExtended gets executed
* *before* Application.onClassExtended so we have to delay namespace handling
* until after Application.onClassExtended kicks in, hence it is done in this hook.
*/
className = Ext.getClassName(cls);
namespace = data.$namespace || data.namespace ||
Ext.app.getNamespace(className) ||
((match = namespaceRe.exec(className)) && match[1]);
//<debug>
if (!namespace) {
Ext.log.warn("Missing namespace for " + className + ", please define it "+
"in namespaces property of your Application class.");
}
//</debug>
//This is the only change on this override.
//http://stackoverflow.com/questions/37731213/extjs-6-stores-config-on-ext-app-controller-not-working/37733261#37733261
if(namespace && namespace.indexOf(".controller") > -1) {
namespace = namespace.slice(0, namespace.indexOf(".controller"));
}
return namespace;
}
}
यदि आपको बेहतर समाधान पता है तो कृपया मुझे बताएं!
क्या आपको अपने नियंत्रक में स्टोर की आवश्यकता थी? यह उदाहरण सुझाव देता है कि यह आवश्यक है: [Ext.app.Controller # cfg-stores] (http://docs.sencha.com/extjs/6.0.2-classic/Ext.app.Controller.html#cfg-stores)। –
स्टोर: ['मेनू'] आपको –