簡體   English   中英

Ext JS應用程序空白頁

[英]Ext JS application blank page

我的app.js

Ext.application( {
    name: 'rgpd',
    appFolder: 'app',
    controllers: [
        'cMain'
    ],
    autoCreateViewport: true,
    init: function() {
    },
    launch: function(){
    }
});

這是我的視口( autoCreateViewport設置為true)( view / Viewport.js

Ext.define('rgpd.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'border',
    items: [
        {
            xtype: 'tabpanel',
            id: 'Rgpd',
            region: 'center',
            tabPosition: 'left',
            titleRotation: 0,
            tabRotation: 0,
            padding:0,
            margin:0,
            split: true,
            header: {
                layout: {
                    //align: 'stretchmax'
                },
                title: {
                    text: 'RGPD',
                    flex: 0
                },
                glyph: 124,
                items: [
                ]
            },
            items: [
                {
                    xtype: 'exemple',
                    textAlign: 'right',
                    flex: 1,
                },
            ]
        }
    ]
});

最后這是我的示例視圖( view / Exemple / View.js

Ext.define('rgpd.view.Exemple.View', {
    extend: 'Ext.Panel',
    xtype: 'exemple',
    id: "exemple",
    title: "Exemple",
    layout: {
        type: 'border',
        pack: 'stretch',
        align: 'stretch'
    },
    padding:20,
    items: [
        {
            title: 'Hello Ext',
            html: 'Hello! Welcome to Ext JS.'
        }
    ]
});

但我得到一個空白頁。 最終目標是顯示一個包含數據庫表所有內容的網格,但是我什至無法顯示HTML。 某處有錯誤嗎?

編輯

這是我的控制器。 然后,感謝您的幫助,問題出在那兒,但是我在控制器中擁有所有的模型,存儲和視圖,我該如何解決呢?

Ext.define('rgpd.controller.cMain', {
    extend: 'Ext.app.Controller',
    models: [
        'mExemple',
        'mCorpsMetier',
        'mUtilisateur'
    ],
    stores: [
        'sExemple',
        'sCorpsMetier',
        'sUtilisateur'
    ],
    views: [
        'Exemple.View',
        'CorpsMetier.View'
    ],
    init: function() {
        this.control({
        });
    },
    onLaunch: function() {
    },
});

文件app.js應該喜歡

Ext.application({

    name: 'rgpd',
    appFolder: 'app',

    requires: [
        'rgpd.*'
    ],

    mainView: 'rgpd.view.Viewport',

    controllers: [
        'cMain'
    ],

    autoCreateViewport: true,

    init: function () {

    },

    launch: function () {

    }
});

(ADD requiresmainView

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM