path of view is incorrect in extjs 4 mvc application

99封情书 提交于 2019-12-06 11:12:01

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

like so...

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();
    }

});

This is easier if you use relative paths in appFolder as:

appFolder:'../../app'

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!