(一)PANEL面板加載JSP內(nèi)容
var boardcenter = new Ext.Panel({
id : 'boardcenter',
autoLoad : {
url : './informationbean/information.jsp'
},
title : '公告',
region : 'north',
html : '公告區(qū)測試內(nèi)容!'
});
(二) 直接用PANEL面板的LOAD方法更新內(nèi)容
panelobject.load({
url: "your-url.jsp", params: {param1: "foo", param2: "bar"}, // or a URL encoded string
callback: yourFunction,
scope: yourObject, // optional scope for the callback
discardUrl: false,
nocache: false,
text: "Loading...",
timeout: 30,
scripts: false
});
(三) 以獲得其PANEL面板內(nèi)容對象,來更新面板內(nèi)容.
var detailcenter = new Ext.Panel({
id:'detailcenter',
height : 250,
region : 'south',
title : '內(nèi)容詳細區(qū)',
html : '詳細內(nèi)容.'
});
// fn : function() {// ----------------
//
// var selNode = view.getSelectedNodes();
// // var detailEl = Ext.getCmp('img-detail-panel').body;
// if(selNode && selNode.length > 0){
// selNode = selNode[0];
// // Ext.getCmp('ok-btn').enable();
// // var data = this.lookup[selNode.id];
// // detailEl.hide();
// // this.detailsTemplate.overwrite(detailEl, data);
// // detailEl.slideIn('l', {stopFx:true,duration:.2});
// // }else{
// // Ext.getCmp('ok-btn').disable();
// // detailEl.update('');
//
//
var bd = Ext.getCmp('detailcenter').body; // 獲得panel主體內(nèi)容
bd.update('').setStyle('background', '#fff'); // 清空panel內(nèi)容
switch (nodetitle)
{
case '測試文章標題1':bd.hide().update('測試文章標題1').slideIn('0', {stopFx:true,duration:.2});break;
default:bd.hide().update('測試文章標題2').slideIn('l', {stopFx:true,duration:.2});break;
}
posted on 2008-08-21 12:24
紫蝶∏飛揚↗ 閱讀(12770)
評論(3) 編輯 收藏 所屬分類:
EXTJS