this.panel = Ext.create({//构造面板
    name: 'objectForm',
    xtype:'form',
    frame: true,
    items: [{
        xtype: 'radiogroup',
        fieldLabel: '对象类型',
        items: [
   {xtype:'radio',boxLabel: '机构', name: 'sjob', inputValue:'0',checked: true},
   {xtype:'radio',boxLabel: '人员', name: 'sjob', inputValue:'1'}
]
    }]
});默认机构选中,但是我选择不上人员按钮,如果把inputValue设置成1和2,那就可以切换!
请各位大牛赐教

解决方案 »

  1.   

    Ext.create('Ext.form.Panel', {
        title: 'RadioGroup Example',
        width: 300,
        height: 125,
        bodyPadding: 10,
        renderTo: Ext.getBody(),
        items:[{
            xtype: 'radiogroup',
            fieldLabel: 'Two Columns',
            // Arrange radio buttons into two columns, distributed vertically
            columns: 2,
            vertical: true,
            items: [
                { boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
                { boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
                { boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
                { boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
                { boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
                { boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
            ]
        }]
    });
    这需要原因么?