Binding passes a reference to the object that you are binding. groupName requires a string. You were passing a reference to the radioButton group object to the groupName property. Of course, Flex saw that and invoked the toString() method of the radioButton group object to pass a string to the radioButton object. In effect, both radioButton groups got the same empty string and thought they were all in the same group.
--- In flexcoders@yahoogroups.com, geeky developer <geekydevelo...@...> wrote: > > Awesome, That works perfectly > Thanks a lot Alex and valdhor for your help, > Now everything is working fine with the binding removed, I am just wondering > why binding can screw the focus issues for the tab pressing :-) > > > On Mon, Mar 16, 2009 at 5:44 AM, valdhor <valdhorli...@...>wrote: > > > You are almost done. Just remove the bindings from your groupNames... > > > > > > <mx:RadioButton id="radioButtonDHCP" label="DHCP" > > groupName="networkSettingsGroup" styleName="textMedium"/> > > <mx:RadioButton label="Static" groupName="networkSettingsGroup" > > styleName="textMedium"/> > > > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, geeky > > developer <geekydeveloper@> wrote: > > > > > > Hey Alex > > > Thanks for replying but if I changed it to GroupName instead of group, it > > > would let me make only one selection of the radio button. No doubt it > > fixed > > > the tab focus issue but I like to use pairs of radio button like in the > > > below example code, I like unitRoleGroup as one group and I like to > > select > > > one of them at a time and networkSettingsGroup as another group in which > > I > > > will like to select one at a time. It would let me do that if I change > > the > > > property name to "group ", it would let me select one of the options if > > use > > > group instead of groupName but then it would screw up the tab focus and > > if I > > > change the group to groupName as recommended, then it fixes the tab focus > > > issue but then it combines all the 4 radio button options into one and I > > > would be able to select only one of them, thats not what i need. I like > > to > > > create 2 different groups of radio buttons like the way it is shown in > > the > > > code and i would like the tab ordering work properly with selecting one > > of > > > the option at a time in each radio button group, Any idea to fix it? > > Thanks > > > a lot for your help > > > > > > > > > /*************************CODE *************************/ > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > layout="absolute"> > > > <mx:VBox width="100%" height="100%" > > > paddingTop="5" paddingRight="5" paddingBottom="5" paddingLeft="5"> > > > > > > <mx:Label text="NSM Settings" styleName="textLarge" > > > fontStyle="italic" width="200"/> > > > > > > <mx:Form id="formMainContainer" width="100%" verticalGap="5" > > > indicatorGap="25" labelWidth="200" > > > paddingTop="0" paddingRight="0" paddingBottom="0" > > > paddingLeft="0" height="262"> > > > > > > <!-- Unit Settings --> > > > <mx:FormItem label="Unit Settings" labelStyleName="textLarge" > > > width="100%" height="25" paddingTop="10"> > > > <mx:HRule width="100%" height="2"/> > > > </mx:FormItem> > > > <mx:FormItem label="Unit Role" labelStyleName="textMedium"> > > > <mx:RadioButtonGroup id="unitRoleGroup" /> > > > <mx:HBox> > > > <mx:RadioButton label="Manager" > > > groupName="{unitRoleGroup}" styleName="textMedium"/> > > > <mx:RadioButton label="Member" > > > groupName="{unitRoleGroup}" styleName="textMedium"/> > > > </mx:HBox> > > > </mx:FormItem> > > > <mx:FormItem label="Unit Name" labelStyleName="textMedium"> > > > <mx:TextInput id="txtUnitName" styleName="inputTextMedium" > > > restrict="a-zA-Z0-9_" > > > /> > > > </mx:FormItem> > > > <mx:FormItem label="Time Zone" labelStyleName="textMedium"> > > > <mx:ComboBox id="cboTimeZone" /> > > > </mx:FormItem> > > > > > > <!-- Network Settings --> > > > <mx:FormItem id="networkSettingsForm" > > > > <mx:RadioButtonGroup id="networkSettingsGroup"/> > > > <mx:HBox> > > > <mx:RadioButton id="radioButtonDHCP" label="DHCP" > > > groupName="{networkSettingsGroup}" styleName="textMedium"/> > > > <mx:RadioButton label="Static" > > > groupName="{networkSettingsGroup}" styleName="textMedium"/> > > > </mx:HBox> > > > </mx:FormItem> > > > <mx:FormItem label="Label"> > > > <mx:Button label="Button"/> > > > </mx:FormItem> > > > <mx:FormItem label="Label"> > > > <mx:Button label="Button"/> > > > </mx:FormItem> > > > <mx:FormItem label="Label"> > > > <mx:Button label="Button"/> > > > </mx:FormItem> > > > > > > </mx:Form> > > > > > > </mx:VBox> > > > > > > </mx:Application> > > > > > > > > > On Fri, Mar 13, 2009 at 3:12 PM, Alex Harui <aharui@> wrote: > > > > > > > You have to set groupName, not group. > > > > > > > > > > > > > > > > <mx:FormItem id="networkSettingsForm" > > > > > > > > > <mx:RadioButtonGroup id="networkSettingsGroup"/> > > > > > > > > <mx:HBox> > > > > > > > > <mx:RadioButton id="radioButtonDHCP" label="DHCP" > > > > groupName="networkSettingsGroup" styleName="textMedium"/> > > > > > > > > <mx:RadioButton label="Static" groupName="networkSettingsGroup" > > > > styleName="textMedium"/> > > > > > > > > </mx:HBox> > > > > > > > > > > > > > > > > Same for the other radiobuttons > > > > > > > > > > > > > > > > Alex Harui > > > > > > > > Flex SDK Developer > > > > > > > > Adobe Systems Inc. <http://www.adobe.com/> > > > > > > > > > > Blog: http://blogs.adobe.com/aharui > > > > > > > > > > > > > > > > *From:* flexcoders@yahoogroups.com > > > > <flexcoders%40yahoogroups.com>[mailto: > > flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>] *On > > > > Behalf Of *anuj181 > > > > *Sent:* Friday, March 13, 2009 10:21 AM > > > > *To:* flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com> > > > > *Subject:* [flexcoders] Weired Focus Change behaviour on tab pressing > > > > > > > > > > > > > > > > Hi Guys > > > > I am trying to make the focus changed consistently to different > > components > > > > in my app but it is showing different behavior when user presses tab. > > Few > > > > things are happening here if one of the radio button from the first > > radio > > > > group has been selected then pressing tab button will keep on cycling > > > > through first 3 components and if the radio buttons are not selected > > then > > > > changing focus on the tab pressing works fine, All I need is that > > whenever > > > > user presses tab key, it changes the focus consistently through all of > > the > > > > components(doesn't matter if the radio button is selected or not) and > > the > > > > same behavior will be followed when user presses the shift+Tab. > > > > Anyone has any idea about whats going on here,Please help me in fixing > > this > > > > issue, > > > > Thanks a lot > > > > geekyDeveloper > > > > /***************CODE*******************/ > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > > > layout="absolute"> > > > > <mx:VBox width="100%" height="100%" > > > > paddingTop="5" paddingRight="5" paddingBottom="5" paddingLeft="5"> > > > > > > > > <mx:Label text="NSM Settings" styleName="textLarge" fontStyle="italic" > > > > width="200"/> > > > > > > > > <mx:Form id="formMainContainer" width="100%" verticalGap="5" > > > > indicatorGap="25" labelWidth="200" > > > > paddingTop="0" paddingRight="0" paddingBottom="0" paddingLeft="0" > > > > height="262"> > > > > > > > > <!-- Unit Settings --> > > > > <mx:FormItem label="Unit Settings" labelStyleName="textLarge" > > width="100%" > > > > height="25" paddingTop="10"> > > > > <mx:HRule width="100%" height="2"/> > > > > </mx:FormItem> > > > > <mx:FormItem label="Unit Role" labelStyleName="textMedium"> > > > > <mx:RadioButtonGroup id="unitRoleGroup" /> > > > > <mx:HBox> > > > > <mx:RadioButton label="Manager" group="{unitRoleGroup}" > > > > styleName="textMedium"/> > > > > <mx:RadioButton label="Member" group="{unitRoleGroup}" > > > > styleName="textMedium"/> > > > > </mx:HBox> > > > > </mx:FormItem> > > > > <mx:FormItem label="Unit Name" labelStyleName="textMedium"> > > > > <mx:TextInput id="txtUnitName" styleName="inputTextMedium" > > > > restrict="a-zA-Z0-9_" > > > > /> > > > > </mx:FormItem> > > > > <mx:FormItem label="Time Zone" labelStyleName="textMedium"> > > > > <mx:ComboBox id="cboTimeZone" /> > > > > </mx:FormItem> > > > > > > > > <!-- Network Settings --> > > > > <mx:FormItem id="networkSettingsForm" > > > > > <mx:RadioButtonGroup id="networkSettingsGroup"/> > > > > <mx:HBox> > > > > <mx:RadioButton id="radioButtonDHCP" label="DHCP" > > > > group="{networkSettingsGroup}" styleName="textMedium"/> > > > > <mx:RadioButton label="Static" group="{networkSettingsGroup}" > > > > styleName="textMedium"/> > > > > </mx:HBox> > > > > </mx:FormItem> > > > > <mx:FormItem label="Label"> > > > > <mx:Button label="Button"/> > > > > </mx:FormItem> > > > > <mx:FormItem label="Label"> > > > > <mx:Button label="Button"/> > > > > </mx:FormItem> > > > > <mx:FormItem label="Label"> > > > > <mx:Button label="Button"/> > > > > </mx:FormItem> > > > > > > > > </mx:Form> > > > > > > > > </mx:VBox> > > > > > > > > </mx:Application> > > > > > > > > > > > > > > > > > > > > > >