在extjs 4 mvc应用程序中的视图不正确 [英] path of view is incorrect in extjs 4 mvc application

查看:104
本文介绍了在extjs 4 mvc应用程序中的视图不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的mvc应用程序部署到我的大型Web应用程序中。我已经定义了应用程序文件夹,并可以在fire bug中查看它正在调用正确的文件,但初始视图除外。所以

I'm trying to deploy my mvc app into my large web application. I have defined the app folder and can see in fire bug that it is calling the correct files with the exception of the initial view. So

App.view.Jobs正在调用

"App.view.Jobs" is calling

https://www.estore.localhost/Jobs/Edit/ext/jobs/App /view/Jobs.js?_dc=1328471746967

当我想要调用

https://www.estore.localhost/ext/ jobs / App / view / Jobs.js?_dc = 1328471746967

  Ext.Loader.setConfig({ enabled: true });
    Ext.application({

        name: 'MyApp',
        appFolder: '/ext/jobs/app',

        models: ['Part', 'Material', 'Job', 'Process'],
        stores: ['SalesContact', 'Parts', 'Materials', 'Jobs', 'AccountHandlers', 'JobTypes', 'Processs', 'Artwork', 'Varnish', 'VarnishType', 'PrintType', 'ProofRequired', 'InvoiceDetails', 'PurchaseOrders'],
        controllers: ['Part', 'Material', 'Job', 'Process', 'Invoice'],

        launch: function () {

            Ext.QuickTips.init();
            var cmp1 = Ext.create('App.view.Jobs', {
                renderTo: "form-job"
            });
            cmp1.show();
        }

    });


推荐答案

回答我自己的问题。您可以使用setPath来分配路径。

to answer my own question. You can use setPath to assign the path.

喜欢这样...

Ext.Loader.setConfig({ enabled: true });
Ext.Loader.setPath('App', '/ext/jobs/app');
Ext.application({

    name: 'Pandora',
    appFolder: '/ext/jobs/app',

    models: ['Part', 'Material', 'Job', 'Process'],
    stores: ['SalesContact', 'Parts', 'Materials', 'Jobs', 'AccountHandlers', 'JobTypes', 'Processs', 'Artwork', 'Varnish', 'VarnishType', 'PrintType', 'ProofRequired', 'InvoiceDetails', 'PurchaseOrders'],
    controllers: ['Part', 'Material', 'Job', 'Process', 'Invoice'],

    launch: function () {

        Ext.QuickTips.init();
        var cmp1 = Ext.create('App.view.Jobs', {
            renderTo: "form-job"
        });
        cmp1.show();
    }

});

这篇关于在extjs 4 mvc应用程序中的视图不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆