문제

I'm not even sure how to search for this, so hopefully this hasn't already been answered a hundred times.

Basically, I have a radio group on my form with three options: Show Completed Exams, Show Incomplete Exams, or Show All Exams.

{
name:           'ShowComplete',
fieldLabel:     'Show',
allowBlank:     true,
columns:        1,
items:          [
                    {
                        name:           'ShowComplete',
                        boxLabel:       'Completed Exams',
                        inputValue:     '1'
                    }, 
                    {
                        name:           'ShowComplete',
                        boxLabel:       'Incomplete Exams',
                        inputValue:     '0'
                    }, 
                    {
                        name:           'ShowComplete',
                        boxLabel:       'All',
                        inputValue:     '-1'
                    }
                ],
xtype:          'radiogroup'
}

When I load the page, I have a nice looking control.

http://dl.dropbox.com/u/298258/extJSRadioGroup.png

However, the only one I can select is Incomplete Exams.

Is there something I am missing? I'm sure it's something simple.

Thanks!

도움이 되었습니까?

해결책

I had a similar issue. I believe it is related to the fact you're giving the value '0' to your middle item.

Perhaps, due to Javascript's nature, it is afterward wrongly interpreted as 'false' or something like that and causes the behavior of the radio buttons to break.

If you replace the '0' by anything else, it should work.

다른 팁

Try taking the name attribute off the RadioGroup... perhaps it is conflicting?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top