以下代碼似乎更改了文本字段值,因爲AFTER警報顯示值已更改。在Extjs 4.2中爲什麼setValue()不更新文本字段?
但是當你看看錶單中的文本框時,它是空白的?
var selectedItem = JSON.parse(CommonUtil.getSelectedRows(this.getSettingGrid()))[0];
alert("BEFORE: " + this.getSettingVcenter().queryById('txtName').getValue());
this.getSettingVcenter().queryById('txtName').setValue(selectedItem.name);
alert("AFTER: " + this.getSettingVcenter().queryById('txtName').getValue());
this.getSettingVcenter()返回什麼? –