4
真的,我有文本框:不能使allowBlank在視覺上ExtJS的
{
xtype : 'textfield',
id: 'specialCode',
allowBlank: true,
fieldLabel : 'Special Code',
name : 'specialCode'
}
我也使它在需要時一個複選框與
Ext.getCmp('specialCode').allowBlank = false;
Ext.getCmp('specialCode').validateValue(Ext.getCmp('specialCode').getValue());
我變成紅色的檢查,它成爲必需。
然後,當另一個複選框cheked我使用此代碼
Ext.getCmp('specialCode').allowBlank = true;
它變得不是必需的,但紅色的邊框沒有消失。我需要點擊該字段和其他地方纔能刪除紅色邊框。