Label.text is just a config, not a property that can be set at runtime. It might be handy to have a setter function, but the lack of one is not a bug. You can do:
To "fix" it add this code before your code:
Ext.getCmp('infoCustomer').getEl().update('something else')Ext.override(Ext.form.Label, {
setText: function(t){
this.text = t;
if(this.rendered){
this.el.update(t);
}
}
});__________________
Brian Moeskau
Ext JS - Core Development Team
Brian Moeskau
Ext JS - Core Development Team
本文介绍了一种在ExtJS框架中动态更新Label组件文本的方法。由于Label的text属性不能在运行时设置,本文提供了一个实用的解决方案:通过覆盖Ext.form.Label并添加setText方法来实现动态文本更新。
1989

被折叠的 条评论
为什么被折叠?



