Extjs3 radiogroup加载表单初始化问题

Ext页面(修改选定记录)包含radiogroup,从后台返回待修改的数据并填入表单。radiogroup总是无法根据后台值初始化。解决方法:给group和各个radio按钮添加相同的name属性。我是因为没有给group赋name属性造成。

{
xtype : 'radiogroup',
fieldLabel : '性别',
id : 'genderRadioGroup',
allowBlank: false,
blankText : '请选择性别',
name : 'gender',
items : [{
        boxLabel : '男',
	name : 'gender',
	inputValue : 'M'
    }, {
	boxLabel : '女',
	name : 'gender',
	inputValue : 'F'
    }]
}
请注意蓝色加粗字体。
This entry was posted in Computer, Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s