Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在ExtJS4应用程序上为视图存储和模型设置自定义文件夹名称?_Javascript_Extjs_Extjs4_Extjs4.1_Extjs Mvc - Fatal编程技术网

Javascript 如何在ExtJS4应用程序上为视图存储和模型设置自定义文件夹名称?

Javascript 如何在ExtJS4应用程序上为视图存储和模型设置自定义文件夹名称?,javascript,extjs,extjs4,extjs4.1,extjs-mvc,Javascript,Extjs,Extjs4,Extjs4.1,Extjs Mvc,我这样问是因为我想启用一个现有的应用程序来使用Sencha CMD,所以第一步是通过以下方式对其进行实例化: Ext.Application 这就提出了第一个问题: 文件夹结构是 someApp --Views --Model --Store --moreFolders (应为模型、商店、视图) 如果可能的话,我想设置文件夹路径,而不是重构数百个类(大型应用程序) 你能想到什么缺点吗?你的方法是什么 任何想法都很受欢迎 使用ExtJs 4.1.1使用 您可以在初始化时针对Ext.applic

我这样问是因为我想启用一个现有的应用程序来使用Sencha CMD,所以第一步是通过以下方式对其进行实例化:

Ext.Application
这就提出了第一个问题:

文件夹结构是

someApp
--Views
--Model
--Store
--moreFolders
(应为模型、商店、视图)

如果可能的话,我想设置文件夹路径,而不是重构数百个类(大型应用程序)

你能想到什么缺点吗?你的方法是什么

任何想法都很受欢迎

使用ExtJs 4.1.1

使用

您可以在初始化时针对Ext.application设置这些设置,例如:

Ext.application({
  name: 'MyApp',
  paths: {
      'MyCustom': 'wherever/custom',
  },
  launch: function() {
    Ext.create('MyCustom.view.List'); // Goes to wherever/custom/view/List.js
  }
});
使用

您可以在初始化时针对Ext.application设置这些设置,例如:

Ext.application({
  name: 'MyApp',
  paths: {
      'MyCustom': 'wherever/custom',
  },
  launch: function() {
    Ext.create('MyCustom.view.List'); // Goes to wherever/custom/view/List.js
  }
});
使用

您可以在初始化时针对Ext.application设置这些设置,例如:

Ext.application({
  name: 'MyApp',
  paths: {
      'MyCustom': 'wherever/custom',
  },
  launch: function() {
    Ext.create('MyCustom.view.List'); // Goes to wherever/custom/view/List.js
  }
});
使用

您可以在初始化时针对Ext.application设置这些设置,例如:

Ext.application({
  name: 'MyApp',
  paths: {
      'MyCustom': 'wherever/custom',
  },
  launch: function() {
    Ext.create('MyCustom.view.List'); // Goes to wherever/custom/view/List.js
  }
});