views:

54

answers:

1

So I declare an ExtJS radio button object like this:

.AddExtObject("{xtype:'radiogroup', ref:'../AndOr', defaults:{name:'rdo-payee2'}, width:120, items:[{boxLabel:'And', checked:true, inputValue:'and'},{boxLabel:'Or', inputValue:'or'}]}")

When I do this:

if (checkWin.Payee2.AndOr.getValue() == 'and') {
                fundingRec.set('IsPayee2RequiredToSign', '1');
            } else {
                fundingRec.set('IsPayee2RequiredToSign', '0');
            }
            Global.alert(checkWin.Payee2.AndOr.getValue());

In my save method however, it outputs this:

[object Object]

So the fundingRec is never getting set as '1' because it always see's that the value is what I have in the text above and always sets it as '0'.

How do I correctly access the value of this field as I need to?

+1  A: 

I figured it out.

If you have an ExtJS RadioGroup, you need to access the radio element IN the group first, and then get that elements group value ('and/or')..not basic value ('true/false')...like this

checkWin.Payee2.AndOr.getValue().getGroupValue()
Scott