如何在创建FormPanel之后,设置textField组件只读?

在ext2.0中,创建FormPanel的时候,

如果直接在config options中直接给某个textField赋配置项readOnly: true,这样是可以使textfield只读,但是我想在创建了FormPanel之后,再根据具体情况给这个textfield配置是否只读



我试过在之后通过formPanel的findById()获得这个textField,然后设置textfield.readOnly = true

并且alert(textfield.readOnly),显示值已经变成了true,但是在组件上并没有体现,还是可编辑



小弟是ext新手,请问应该如何设置,并说说其中的原理

textfield.getEl().dom.readOnly = true;
因为:
readOnly : Boolean
True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.

xtype:'textfield',
fieldLabel:'编号',
readOnly:true,
name:'idSql',
width:50

{
fieldLabel: 'recordID',
name: 'recordid',
disabled:true,
width:40
}