如何使已经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('提示','对图片进行签章确认!');
    }
});

解决方案 »

  1.   

    panel.doLayout(),lz去api查查这个方法的用法,应该可以实现你的需求。
      

  2.   

    用原始点的方法也可以。

    Ext.extend(Ext.JDAN.FactureManage.fileStampPanel, Ext.Panel, {
        onBtnStamp:function(){
    this.imageName = 'xxxx.jpg';//image you going to change
    this.stampUserName = 'hello world';//text you going to fill
    var body = Ext.getDom(this.body);
    body.style.cssText = 'background-image:url('+this.imageName+');line-height:60px;';
    body.innerHTML     = ' <center> <font">'+ this.stampUserName + ' </font> </center>'
        //Ext.MessageBox.alert('提示','对图片进行签章确认!');
        }
    }); 
      

  3.   

    你看好 doLayout 的方法是用来重新计算已经渲染完成的容器。并不是重新渲染指定的容器。