2010-08-09 57 views
0

我正在嘗試將ExtJS 2.0與Java豐富的界面相集成。我正在嘗試使用Ext.Panel獲取基本佈局。 所以我寫了這樣的代碼:EXT JS佈局XHTML

Ext.onReady(function() 
{ 

Ext.QuickTips.init(); 

var myBorderPanel = new Ext.Panel(
{ 
renderTo: document.body, 
width: 700, 
height: 500, 
title: 'Border Layout', 
layout: 'border', 
items: 
[ 
{ 
    autoLoad:{url: 'panel.html', scripts:true}, 
    renderTo: document.body.footer, // a div by name footer 
    title: 'South Region is resizable', 
    region: 'south',  // position for region 
    height: 100, 
    split: true,   // enable resizing 
    minSize: 75,   // defaults to 50 
    maxSize: 150, 
    margins: '0 5 5 5' 
}] 
}); 

});' 

上面的代碼工作正常。但在上面的代碼中,如果我使用panel.xhtml而不是panel.html,它不起作用。

如果這是轉貼,我很抱歉。

回答

0

我得到它的工作,但沒有使用autoLoad。我使用了contentEl,這是一個完美的選擇。