質問

私はこれが些細な問題であると確信しており、私はちょっと愚かです。あなたの助けは大歓迎です。

コントロール/dashboard.jsで私は持っています:

    Ext.ill.WCSS.controls.dashboard = {
        xtype:'portal',
        region:'center',
        margins:'35 5 5 0',
        items:[{
            columnWidth: 1,
            style:'padding:10px',
            items:[{
                title: 'My Cluster Jobs',
                layout:'fit',
                html: "test"
            }]
        },{
            columnWidth: 1,
            style:'padding:10px',
            items:[{
                title: 'All Cluster Jobs',
                iconCls: 'icon-queue',
                html: "test",
                items: new Ext.grid.GridPanel({
                        title: 'Cluster Job Queue',
                        store: Ext.ill.WCSS.stores.dashboardClusterJobs,
                        width: 791,
                        height: 333,
                        frame: true,
                        loadMask: true,
                        stateful: false,
                        autoHeight: true,
                        stripeRows: true,
                        floating: false,
                        footer: false,
                        collapsible: false,
                        animCollapse: false,
                        titleCollapse: false,
                        columns:[
                                {
                                    xtype: 'gridcolumn',
                                    header: 'Job ID',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'JB_job_number',
                                    fixed: false
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'Priority',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'JAT_prio',
                                    fixed: false
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'User',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'JB_owner'
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'State',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'state'
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'Date Submitted',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'JAT_start_time'
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'Queue',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'queue_name'
                                },
                                {
                                    xtype: 'gridcolumn',
                                    header: 'CPUs',
                                    sortable: true,
                                    resizable: true,
                                    width: 100,
                                    dataIndex: 'slots'
                                }
                            ],
                            bbar: {
                                xtype: 'paging',
                                store: 'storeClusterQueue',
                                displayInfo: true,
                                refreshText: 'Retrieving queue status...',
                                emptyMsg: 'No jobs to retrieve',
                                id: 'clusterQueuePaging'
                            }
                    })
            }]
}]
};

簡単に言えば、「ext.ill.wcss.stores.dashboardclusterjobs」への参照に注意してください。

だから店/dashboard.jsで私はこれを持っているだけです:

Ext.ill.WCSS.stores.dashboardClusterJobs = new Ext.data.XmlStore({
    storeId: 'storeClusterJobs',
    record: 'job_list',
    autoLoad: true,
    url: 'joblist.xml',
    idPath: 'job_info',
    remoteSort: false,
    fields: [
        {
            name: 'JB_job_number'
        },
        {
            name: 'JAT_prio'
        },
        {
            name: 'JB_name'
        },
        {
            name: 'JB_owner'
        },
        {
            name: 'state'
        },
        {
            name: 'JAT_start_time'
        },
        {
            name: 'slots'
        },
        {
            name: 'queue_name'
        }
    ]
});

私はコードを実行し、「店は未定義です」を取得します。すべてのJavaScriptsが正しい順序で含まれています。

すなわち

<script type="text/javascript" src="/js/portal.js"></script>
<script type="text/javascript" src="/js/stores/dashboard.js"></script>
<script type="text/javascript" src="/js/controls/dashboard.js"></script>

みんなありがとう!

役に立ちましたか?

解決 3

私はそれを考え出した。 JavaScriptファイルの注文に関係していました。 (おっと!)あなたの助けに感謝し、応答が遅れていることをお詫びします。

他のヒント

名前空間の問題かもしれません。あなたは何をしますか Ext.ns 宣言はどのように見えますか?

もっと情報が必要だと思います。 XTypeを使用しています ポータル (コードがありません)そして、このオブジェクトがどのようにインスタンス化されているかは明らかではありません(コードがありません)。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top