Ext.form.TextField.override({
initComponent: Ext.form.TextField.prototype.initComponent.createInterceptor(function(){
if (this.allowBlank === false && this.fieldLabel) {
this.fieldLabel += '<font color=red>*</font>';
}
})
});
所有的输入项如果配置了allowBlack 为false,它的label后面就都会有红星号了,方便日后统一修改,注意:方法重写的代码最好放到onReady函数上面

1 楼
tianhengbao
2010-05-25
能图片的那个combobox的代码贴出来吗?看下是怎么配置的?谢谢。