EXT的panel刷新问题,请教高手!!
暴龙神 2009-04-14 10:08:46
如何使已经new过的panel重新刷新、构造??
代码如下所示:当我用getCmp获取到fileStampPanel 的对象后,改变这个对象的属性, this.stampState=stampState;
this.stampUserName=stampUserName;
this.imageName 值改变后,我打算让panel重新生成一次,注意不是重新new,好刷新panel达到我想要的目的,但是panel的render等方法都不好用,有什么办法么???
JDAN.FactureManage.fileStampPanel = function(stampState,stampUserName){
//默认属性
this.stampState=stampState;
this.stampUserName=stampUserName;
this.imageName = this.stampState==true?'stampbgimageGreen.gif':'stampbgimage.gif';
JDAN.FactureManage.fileStampPanel.superclass.constructor.call(this, {
id:'fileStampPanel',
title : '签章信息',
height : 120,
iconCls : 'icn2Mam',
bodyStyle : 'background-image:url(../FactureManage/Images/'+this.imageName+');line-height:60px;',// 加背景图片并使文字居中
html : '<center><font size=6 color=white style="FONT-FAMILY: 隶书">'
+ this.stampUserName + '</font></center>',
tbar : [{
text : '签章',
tooltip : '文件确认签章',
scope : this,
iconCls : 'icnRefresh',
handler : this.onBtnStamp
}]
})
};
Ext.extend(JDAN.FactureManage.fileStampPanel, Ext.Panel, {
onBtnStamp:function(){
var stampWin = new JDAN.FactureManage.ProgramStampWin();
stampWin.show();
//Ext.MessageBox.alert('提示','对图片进行签章确认!');
}
});