2 Replies Latest reply on Jul 7, 2009 6:43 AM by wesyah234

    radioButtonGroup is not seen when calling getChildren on parent component... help please

    wesyah234

      I have a standard form (with textareas, date controls, checkboxes, etc), and I'm trying to recursively drill into it to visit all the fields and determine their id and textual value.  I am successfully seeing all the controls, except for the RadioButtonGroup.  For example, when I use the following mxml for the form:

       

       

       

       

       

       

       

       

       

       

      <mx:GridItem>

       

       

       

       

      <mx:FormItem id="litFormItem" label="Is there any litigation involved?" width="300" horizontalAlign="right">

       

       

        <mx:RadioButtonGroup id="litInvolved" enabled="true" />

       

       

        <mx:RadioButton id="litInvolvedYes" value="1" label="Yes" groupName="litInvolved"/>

       

       

        <mx:RadioButton id="litInvolvedNo" value="0" label="No" groupName="litInvolved"/>

       

       

      </mx:FormItem>

       

       

      </mx:GridItem>

       

      The recursive code visits the grid item, sees one child (the form item), then visits the form item, but here it only sees 2 children (the 2 radio buttons)... it doesn't see 3 children, which I would expect.

       

      Therefore, I am unable to access the radiobuttongroup in order to access the "selectedValue" property which would give me a 1 if they clicked the Yes radio button, and a 0 if they clicked the No radio button.

       

      If I use the debugger, stop at the level of the form item, and look at its properties, I see a property named $numChildren, which is set to 3, but I also see a property named numChildren (with no dollar sign) which is set to 2. This is another thing that is confusing...

       

      Any help is appreciated... Thank you.