PDA

View Full Version : simple panel.setHtml()



franck34
25 Sep 2008, 5:56 AM
how to update html of a body panel ?


Ext.override(Ext.Panel,{
setHtml:function(text) {
this.body.dom.firstChild.nodeValue=text;
}
});



Franck

mystix
25 Sep 2008, 6:53 AM
errrr...



myPanel.body.update('some html string');

does the same thing...


http://extjs.com/docs/?class=Ext.Element&member=update

franck34
26 Sep 2008, 4:46 AM
Yep true ... shame on me.

In fact, first my mind stayed on setFieldLabel on a fieldset which didn't exist so for that i need to override and second, i saw that update() only work one time on some ext elements.

Franck