You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2013/10/11 23:18:12 UTC

RadioButtonGroup

I am using the following design pattern from docs for all RadioButtonGroups:

 <fx:Declarations>
        <s:RadioButtonGroup id="cardtype"
            itemClick="handleCard(event);"/>
    </fx:Declarations>

    <s:VGroup>
        <s:RadioButton group="{cardtype}"
            id="americanExpress"
            label="American Express"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="masterCard"
            label="MasterCard"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="visa"
            label="Visa"
            width="150"/>
    </s:VGroup>

It all works fine. But here is a problem. It looks like if the same id
is used on different screens then it's going to be the at run time
which causes problems with tabbing. If I tab from a RadioButtonGroup
to another control but somewhere on the screen there is another
RadioButtonGroup the control goes to that RadioButtonGroup. I am also
not sure how binding is working either since it's the same id that a
mode property is bound to. But two different controls. Any thoughts?

Re: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.

On 10/15/13 3:01 AM, "mark goldin" <ma...@gmail.com> wrote:

>Another idea is to be able to generate new or modify existing template
>that
>can look like this:
><fx:Declarations>
><s:RadioButtonGroup id="cardtype"/>
></fx:Declarations>
><s:HGroup>
><s:RadioButton group="{cardtype}"
>   id="americanExpress"
>   label="American Express"
>   width="150"/>
><s:RadioButton group="{cardtype}"
>   id="masterCard"
>   label="MasterCard"
>   width="150"/>
></s:HGroup>
>
>All I will need to do is to change "cardtype" to some unique name for
>every
>RadioButtonGroup being added at the run time.
>Is something like this possible?
That would be tricky because a property called "cardtype" is generated on
the enclosing class and if you change the name you need to generate a
different property slot as which you can't do at runtime.

I think the best bet is to assume that all radiobuttons in a
radiobuttongroup are in the same MXML file/instance so that groupname
doesn't have to be unique everywhere.

-Alex


Re: RadioButtonGroup

Posted by mark goldin <ma...@gmail.com>.
Another idea is to be able to generate new or modify existing template that
can look like this:
<fx:Declarations>
<s:RadioButtonGroup id="cardtype"/>
</fx:Declarations>
<s:HGroup>
<s:RadioButton group="{cardtype}"
   id="americanExpress"
   label="American Express"
   width="150"/>
<s:RadioButton group="{cardtype}"
   id="masterCard"
   label="MasterCard"
   width="150"/>
</s:HGroup>

All I will need to do is to change "cardtype" to some unique name for every
RadioButtonGroup being added at the run time.
Is something like this possible?

On Mon, Oct 14, 2013 at 12:37 PM, Alex Harui <ah...@adobe.com> wrote:

> https://issues.apache.org/jira/browse/FLEX
>
> On 10/14/13 10:17 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >What's a link to the bug system?
> >
> >
> >On Mon, Oct 14, 2013 at 10:28 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> OK, I get it now.
> >>
> >> There may not be a good way to template radiobuttons in MXML.  I found
> >> when digging into another issue that the groupName is looked up on the
> >> document.  We may want to change FocusManager to assume that groupnames
> >> are local to documents.  Feel free to file a bug for that.
> >>
> >> -Alex
> >>
> >> On 10/14/13 8:11 AM, "mark goldin" <ma...@gmail.com> wrote:
> >>
> >> >Right, but then in order to get the selected value out of the
> >> >radiobuttongroup I am binding it to a model.
> >> >Something like this:
> >> >BindingUtil.bindProperty(cardtype, "selectedValue", ....);
> >> >
> >> >
> >> >On Mon, Oct 14, 2013 at 9:58 AM, Alex Harui <ah...@adobe.com> wrote:
> >> >
> >> >> I"m not understanding.  In this example you are binding the radio
> >> >>buttons
> >> >> to the RadioButtonGroup, not some model.
> >> >>
> >> >> -Alex
> >> >>
> >> >> On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:
> >> >>
> >> >> >Now, I am doing:
> >> >> >
> >> >> ><fx:Declarations>
> >> >> >        <s:RadioButtonGroup id="cardtype"
> >> >> >            itemClick="handleCard(event);"/>
> >> >> >    </fx:Declarations>
> >> >> >
> >> >> >    <s:VGroup>
> >> >> >        <s:RadioButton group="{cardtype}"
> >> >> >            id="americanExpress"
> >> >> >            label="American Express"
> >> >> >            width="150"/>
> >> >> >        <s:RadioButton group="{cardtype}"
> >> >> >            id="masterCard"
> >> >> >            label="MasterCard"
> >> >> >            width="150"/>
> >> >> >        <s:RadioButton group="{cardtype}"
> >> >> >            id="visa"
> >> >> >            label="Visa"
> >> >> >            width="150"/>
> >> >> >    </s:VGroup>
> >> >> >
> >> >> >I am binding my model to an object with id "cardtype" and its
> >> >> >selectedValue. But if I use groupName how that is going to work?
> >> >> >
> >> >> >
> >> >> >
> >> >> >On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com>
> >>wrote:
> >> >> >
> >> >> >> Not sure what you mean.  How are you doing it now.
> >> >> >>
> >> >> >> -Alex
> >> >> >>
> >> >> >> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com>
> wrote:
> >> >> >>
> >> >> >> >But how would I bind radiogroups to a model if they wont have
> >> >>"visible"
> >> >> >> >ids?
> >> >> >> >
> >> >> >> >
> >> >> >> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com>
> >> >>wrote:
> >> >> >> >
> >> >> >> >> Binding is internal to a set of instances in an MXML instance.
> >> >> >> >>  FocusManager looks everywhere.  So unfortunately, that means
> >>you
> >> >> >>can't
> >> >> >> >>use
> >> >> >> >> MXML as a template for stamping out copies of radiobuttons.
> >> >> >> >>
> >> >> >> >> I would use groupName and set it somehow.
> >> >> >> >>
> >> >> >> >> -Alex
> >> >> >> >> ________________________________________
> >> >> >> >> From: mark goldin [markzolotoy@gmail.com]
> >> >> >> >> Sent: Friday, October 11, 2013 2:18 PM
> >> >> >> >> To: users
> >> >> >> >> Subject: RadioButtonGroup
> >> >> >> >>
> >> >> >> >> I am using the following design pattern from docs for all
> >> >> >> >> RadioButtonGroups:
> >> >> >> >>
> >> >> >> >>  <fx:Declarations>
> >> >> >> >>         <s:RadioButtonGroup id="cardtype"
> >> >> >> >>             itemClick="handleCard(event);"/>
> >> >> >> >>     </fx:Declarations>
> >> >> >> >>
> >> >> >> >>     <s:VGroup>
> >> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >> >>             id="americanExpress"
> >> >> >> >>             label="American Express"
> >> >> >> >>             width="150"/>
> >> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >> >>             id="masterCard"
> >> >> >> >>             label="MasterCard"
> >> >> >> >>             width="150"/>
> >> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >> >>             id="visa"
> >> >> >> >>             label="Visa"
> >> >> >> >>             width="150"/>
> >> >> >> >>     </s:VGroup>
> >> >> >> >>
> >> >> >> >> It all works fine. But here is a problem. It looks like if the
> >> >>same
> >> >> >>id
> >> >> >> >> is used on different screens then it's going to be the at run
> >>time
> >> >> >> >> which causes problems with tabbing. If I tab from a
> >> >>RadioButtonGroup
> >> >> >> >> to another control but somewhere on the screen there is another
> >> >> >> >> RadioButtonGroup the control goes to that RadioButtonGroup. I
> >>am
> >> >>also
> >> >> >> >> not sure how binding is working either since it's the same id
> >> >>that a
> >> >> >> >> mode property is bound to. But two different controls. Any
> >> >>thoughts?
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.
https://issues.apache.org/jira/browse/FLEX

On 10/14/13 10:17 AM, "mark goldin" <ma...@gmail.com> wrote:

>What's a link to the bug system?
>
>
>On Mon, Oct 14, 2013 at 10:28 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> OK, I get it now.
>>
>> There may not be a good way to template radiobuttons in MXML.  I found
>> when digging into another issue that the groupName is looked up on the
>> document.  We may want to change FocusManager to assume that groupnames
>> are local to documents.  Feel free to file a bug for that.
>>
>> -Alex
>>
>> On 10/14/13 8:11 AM, "mark goldin" <ma...@gmail.com> wrote:
>>
>> >Right, but then in order to get the selected value out of the
>> >radiobuttongroup I am binding it to a model.
>> >Something like this:
>> >BindingUtil.bindProperty(cardtype, "selectedValue", ....);
>> >
>> >
>> >On Mon, Oct 14, 2013 at 9:58 AM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> I"m not understanding.  In this example you are binding the radio
>> >>buttons
>> >> to the RadioButtonGroup, not some model.
>> >>
>> >> -Alex
>> >>
>> >> On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:
>> >>
>> >> >Now, I am doing:
>> >> >
>> >> ><fx:Declarations>
>> >> >        <s:RadioButtonGroup id="cardtype"
>> >> >            itemClick="handleCard(event);"/>
>> >> >    </fx:Declarations>
>> >> >
>> >> >    <s:VGroup>
>> >> >        <s:RadioButton group="{cardtype}"
>> >> >            id="americanExpress"
>> >> >            label="American Express"
>> >> >            width="150"/>
>> >> >        <s:RadioButton group="{cardtype}"
>> >> >            id="masterCard"
>> >> >            label="MasterCard"
>> >> >            width="150"/>
>> >> >        <s:RadioButton group="{cardtype}"
>> >> >            id="visa"
>> >> >            label="Visa"
>> >> >            width="150"/>
>> >> >    </s:VGroup>
>> >> >
>> >> >I am binding my model to an object with id "cardtype" and its
>> >> >selectedValue. But if I use groupName how that is going to work?
>> >> >
>> >> >
>> >> >
>> >> >On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com>
>>wrote:
>> >> >
>> >> >> Not sure what you mean.  How are you doing it now.
>> >> >>
>> >> >> -Alex
>> >> >>
>> >> >> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
>> >> >>
>> >> >> >But how would I bind radiogroups to a model if they wont have
>> >>"visible"
>> >> >> >ids?
>> >> >> >
>> >> >> >
>> >> >> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com>
>> >>wrote:
>> >> >> >
>> >> >> >> Binding is internal to a set of instances in an MXML instance.
>> >> >> >>  FocusManager looks everywhere.  So unfortunately, that means
>>you
>> >> >>can't
>> >> >> >>use
>> >> >> >> MXML as a template for stamping out copies of radiobuttons.
>> >> >> >>
>> >> >> >> I would use groupName and set it somehow.
>> >> >> >>
>> >> >> >> -Alex
>> >> >> >> ________________________________________
>> >> >> >> From: mark goldin [markzolotoy@gmail.com]
>> >> >> >> Sent: Friday, October 11, 2013 2:18 PM
>> >> >> >> To: users
>> >> >> >> Subject: RadioButtonGroup
>> >> >> >>
>> >> >> >> I am using the following design pattern from docs for all
>> >> >> >> RadioButtonGroups:
>> >> >> >>
>> >> >> >>  <fx:Declarations>
>> >> >> >>         <s:RadioButtonGroup id="cardtype"
>> >> >> >>             itemClick="handleCard(event);"/>
>> >> >> >>     </fx:Declarations>
>> >> >> >>
>> >> >> >>     <s:VGroup>
>> >> >> >>         <s:RadioButton group="{cardtype}"
>> >> >> >>             id="americanExpress"
>> >> >> >>             label="American Express"
>> >> >> >>             width="150"/>
>> >> >> >>         <s:RadioButton group="{cardtype}"
>> >> >> >>             id="masterCard"
>> >> >> >>             label="MasterCard"
>> >> >> >>             width="150"/>
>> >> >> >>         <s:RadioButton group="{cardtype}"
>> >> >> >>             id="visa"
>> >> >> >>             label="Visa"
>> >> >> >>             width="150"/>
>> >> >> >>     </s:VGroup>
>> >> >> >>
>> >> >> >> It all works fine. But here is a problem. It looks like if the
>> >>same
>> >> >>id
>> >> >> >> is used on different screens then it's going to be the at run
>>time
>> >> >> >> which causes problems with tabbing. If I tab from a
>> >>RadioButtonGroup
>> >> >> >> to another control but somewhere on the screen there is another
>> >> >> >> RadioButtonGroup the control goes to that RadioButtonGroup. I
>>am
>> >>also
>> >> >> >> not sure how binding is working either since it's the same id
>> >>that a
>> >> >> >> mode property is bound to. But two different controls. Any
>> >>thoughts?
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: RadioButtonGroup

Posted by mark goldin <ma...@gmail.com>.
What's a link to the bug system?


On Mon, Oct 14, 2013 at 10:28 AM, Alex Harui <ah...@adobe.com> wrote:

> OK, I get it now.
>
> There may not be a good way to template radiobuttons in MXML.  I found
> when digging into another issue that the groupName is looked up on the
> document.  We may want to change FocusManager to assume that groupnames
> are local to documents.  Feel free to file a bug for that.
>
> -Alex
>
> On 10/14/13 8:11 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >Right, but then in order to get the selected value out of the
> >radiobuttongroup I am binding it to a model.
> >Something like this:
> >BindingUtil.bindProperty(cardtype, "selectedValue", ....);
> >
> >
> >On Mon, Oct 14, 2013 at 9:58 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> I"m not understanding.  In this example you are binding the radio
> >>buttons
> >> to the RadioButtonGroup, not some model.
> >>
> >> -Alex
> >>
> >> On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:
> >>
> >> >Now, I am doing:
> >> >
> >> ><fx:Declarations>
> >> >        <s:RadioButtonGroup id="cardtype"
> >> >            itemClick="handleCard(event);"/>
> >> >    </fx:Declarations>
> >> >
> >> >    <s:VGroup>
> >> >        <s:RadioButton group="{cardtype}"
> >> >            id="americanExpress"
> >> >            label="American Express"
> >> >            width="150"/>
> >> >        <s:RadioButton group="{cardtype}"
> >> >            id="masterCard"
> >> >            label="MasterCard"
> >> >            width="150"/>
> >> >        <s:RadioButton group="{cardtype}"
> >> >            id="visa"
> >> >            label="Visa"
> >> >            width="150"/>
> >> >    </s:VGroup>
> >> >
> >> >I am binding my model to an object with id "cardtype" and its
> >> >selectedValue. But if I use groupName how that is going to work?
> >> >
> >> >
> >> >
> >> >On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com> wrote:
> >> >
> >> >> Not sure what you mean.  How are you doing it now.
> >> >>
> >> >> -Alex
> >> >>
> >> >> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
> >> >>
> >> >> >But how would I bind radiogroups to a model if they wont have
> >>"visible"
> >> >> >ids?
> >> >> >
> >> >> >
> >> >> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com>
> >>wrote:
> >> >> >
> >> >> >> Binding is internal to a set of instances in an MXML instance.
> >> >> >>  FocusManager looks everywhere.  So unfortunately, that means you
> >> >>can't
> >> >> >>use
> >> >> >> MXML as a template for stamping out copies of radiobuttons.
> >> >> >>
> >> >> >> I would use groupName and set it somehow.
> >> >> >>
> >> >> >> -Alex
> >> >> >> ________________________________________
> >> >> >> From: mark goldin [markzolotoy@gmail.com]
> >> >> >> Sent: Friday, October 11, 2013 2:18 PM
> >> >> >> To: users
> >> >> >> Subject: RadioButtonGroup
> >> >> >>
> >> >> >> I am using the following design pattern from docs for all
> >> >> >> RadioButtonGroups:
> >> >> >>
> >> >> >>  <fx:Declarations>
> >> >> >>         <s:RadioButtonGroup id="cardtype"
> >> >> >>             itemClick="handleCard(event);"/>
> >> >> >>     </fx:Declarations>
> >> >> >>
> >> >> >>     <s:VGroup>
> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >>             id="americanExpress"
> >> >> >>             label="American Express"
> >> >> >>             width="150"/>
> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >>             id="masterCard"
> >> >> >>             label="MasterCard"
> >> >> >>             width="150"/>
> >> >> >>         <s:RadioButton group="{cardtype}"
> >> >> >>             id="visa"
> >> >> >>             label="Visa"
> >> >> >>             width="150"/>
> >> >> >>     </s:VGroup>
> >> >> >>
> >> >> >> It all works fine. But here is a problem. It looks like if the
> >>same
> >> >>id
> >> >> >> is used on different screens then it's going to be the at run time
> >> >> >> which causes problems with tabbing. If I tab from a
> >>RadioButtonGroup
> >> >> >> to another control but somewhere on the screen there is another
> >> >> >> RadioButtonGroup the control goes to that RadioButtonGroup. I am
> >>also
> >> >> >> not sure how binding is working either since it's the same id
> >>that a
> >> >> >> mode property is bound to. But two different controls. Any
> >>thoughts?
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.
OK, I get it now.

There may not be a good way to template radiobuttons in MXML.  I found
when digging into another issue that the groupName is looked up on the
document.  We may want to change FocusManager to assume that groupnames
are local to documents.  Feel free to file a bug for that.

-Alex

On 10/14/13 8:11 AM, "mark goldin" <ma...@gmail.com> wrote:

>Right, but then in order to get the selected value out of the
>radiobuttongroup I am binding it to a model.
>Something like this:
>BindingUtil.bindProperty(cardtype, "selectedValue", ....);
>
>
>On Mon, Oct 14, 2013 at 9:58 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> I"m not understanding.  In this example you are binding the radio
>>buttons
>> to the RadioButtonGroup, not some model.
>>
>> -Alex
>>
>> On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:
>>
>> >Now, I am doing:
>> >
>> ><fx:Declarations>
>> >        <s:RadioButtonGroup id="cardtype"
>> >            itemClick="handleCard(event);"/>
>> >    </fx:Declarations>
>> >
>> >    <s:VGroup>
>> >        <s:RadioButton group="{cardtype}"
>> >            id="americanExpress"
>> >            label="American Express"
>> >            width="150"/>
>> >        <s:RadioButton group="{cardtype}"
>> >            id="masterCard"
>> >            label="MasterCard"
>> >            width="150"/>
>> >        <s:RadioButton group="{cardtype}"
>> >            id="visa"
>> >            label="Visa"
>> >            width="150"/>
>> >    </s:VGroup>
>> >
>> >I am binding my model to an object with id "cardtype" and its
>> >selectedValue. But if I use groupName how that is going to work?
>> >
>> >
>> >
>> >On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Not sure what you mean.  How are you doing it now.
>> >>
>> >> -Alex
>> >>
>> >> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
>> >>
>> >> >But how would I bind radiogroups to a model if they wont have
>>"visible"
>> >> >ids?
>> >> >
>> >> >
>> >> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com>
>>wrote:
>> >> >
>> >> >> Binding is internal to a set of instances in an MXML instance.
>> >> >>  FocusManager looks everywhere.  So unfortunately, that means you
>> >>can't
>> >> >>use
>> >> >> MXML as a template for stamping out copies of radiobuttons.
>> >> >>
>> >> >> I would use groupName and set it somehow.
>> >> >>
>> >> >> -Alex
>> >> >> ________________________________________
>> >> >> From: mark goldin [markzolotoy@gmail.com]
>> >> >> Sent: Friday, October 11, 2013 2:18 PM
>> >> >> To: users
>> >> >> Subject: RadioButtonGroup
>> >> >>
>> >> >> I am using the following design pattern from docs for all
>> >> >> RadioButtonGroups:
>> >> >>
>> >> >>  <fx:Declarations>
>> >> >>         <s:RadioButtonGroup id="cardtype"
>> >> >>             itemClick="handleCard(event);"/>
>> >> >>     </fx:Declarations>
>> >> >>
>> >> >>     <s:VGroup>
>> >> >>         <s:RadioButton group="{cardtype}"
>> >> >>             id="americanExpress"
>> >> >>             label="American Express"
>> >> >>             width="150"/>
>> >> >>         <s:RadioButton group="{cardtype}"
>> >> >>             id="masterCard"
>> >> >>             label="MasterCard"
>> >> >>             width="150"/>
>> >> >>         <s:RadioButton group="{cardtype}"
>> >> >>             id="visa"
>> >> >>             label="Visa"
>> >> >>             width="150"/>
>> >> >>     </s:VGroup>
>> >> >>
>> >> >> It all works fine. But here is a problem. It looks like if the
>>same
>> >>id
>> >> >> is used on different screens then it's going to be the at run time
>> >> >> which causes problems with tabbing. If I tab from a
>>RadioButtonGroup
>> >> >> to another control but somewhere on the screen there is another
>> >> >> RadioButtonGroup the control goes to that RadioButtonGroup. I am
>>also
>> >> >> not sure how binding is working either since it's the same id
>>that a
>> >> >> mode property is bound to. But two different controls. Any
>>thoughts?
>> >> >>
>> >>
>> >>
>>
>>


Re: RadioButtonGroup

Posted by mark goldin <ma...@gmail.com>.
Right, but then in order to get the selected value out of the
radiobuttongroup I am binding it to a model.
Something like this:
BindingUtil.bindProperty(cardtype, "selectedValue", ....);


On Mon, Oct 14, 2013 at 9:58 AM, Alex Harui <ah...@adobe.com> wrote:

> I"m not understanding.  In this example you are binding the radio buttons
> to the RadioButtonGroup, not some model.
>
> -Alex
>
> On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >Now, I am doing:
> >
> ><fx:Declarations>
> >        <s:RadioButtonGroup id="cardtype"
> >            itemClick="handleCard(event);"/>
> >    </fx:Declarations>
> >
> >    <s:VGroup>
> >        <s:RadioButton group="{cardtype}"
> >            id="americanExpress"
> >            label="American Express"
> >            width="150"/>
> >        <s:RadioButton group="{cardtype}"
> >            id="masterCard"
> >            label="MasterCard"
> >            width="150"/>
> >        <s:RadioButton group="{cardtype}"
> >            id="visa"
> >            label="Visa"
> >            width="150"/>
> >    </s:VGroup>
> >
> >I am binding my model to an object with id "cardtype" and its
> >selectedValue. But if I use groupName how that is going to work?
> >
> >
> >
> >On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Not sure what you mean.  How are you doing it now.
> >>
> >> -Alex
> >>
> >> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
> >>
> >> >But how would I bind radiogroups to a model if they wont have "visible"
> >> >ids?
> >> >
> >> >
> >> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com> wrote:
> >> >
> >> >> Binding is internal to a set of instances in an MXML instance.
> >> >>  FocusManager looks everywhere.  So unfortunately, that means you
> >>can't
> >> >>use
> >> >> MXML as a template for stamping out copies of radiobuttons.
> >> >>
> >> >> I would use groupName and set it somehow.
> >> >>
> >> >> -Alex
> >> >> ________________________________________
> >> >> From: mark goldin [markzolotoy@gmail.com]
> >> >> Sent: Friday, October 11, 2013 2:18 PM
> >> >> To: users
> >> >> Subject: RadioButtonGroup
> >> >>
> >> >> I am using the following design pattern from docs for all
> >> >> RadioButtonGroups:
> >> >>
> >> >>  <fx:Declarations>
> >> >>         <s:RadioButtonGroup id="cardtype"
> >> >>             itemClick="handleCard(event);"/>
> >> >>     </fx:Declarations>
> >> >>
> >> >>     <s:VGroup>
> >> >>         <s:RadioButton group="{cardtype}"
> >> >>             id="americanExpress"
> >> >>             label="American Express"
> >> >>             width="150"/>
> >> >>         <s:RadioButton group="{cardtype}"
> >> >>             id="masterCard"
> >> >>             label="MasterCard"
> >> >>             width="150"/>
> >> >>         <s:RadioButton group="{cardtype}"
> >> >>             id="visa"
> >> >>             label="Visa"
> >> >>             width="150"/>
> >> >>     </s:VGroup>
> >> >>
> >> >> It all works fine. But here is a problem. It looks like if the same
> >>id
> >> >> is used on different screens then it's going to be the at run time
> >> >> which causes problems with tabbing. If I tab from a RadioButtonGroup
> >> >> to another control but somewhere on the screen there is another
> >> >> RadioButtonGroup the control goes to that RadioButtonGroup. I am also
> >> >> not sure how binding is working either since it's the same id that a
> >> >> mode property is bound to. But two different controls. Any thoughts?
> >> >>
> >>
> >>
>
>

Re: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.
I"m not understanding.  In this example you are binding the radio buttons
to the RadioButtonGroup, not some model.

-Alex

On 10/14/13 4:51 AM, "mark goldin" <ma...@gmail.com> wrote:

>Now, I am doing:
>
><fx:Declarations>
>        <s:RadioButtonGroup id="cardtype"
>            itemClick="handleCard(event);"/>
>    </fx:Declarations>
>
>    <s:VGroup>
>        <s:RadioButton group="{cardtype}"
>            id="americanExpress"
>            label="American Express"
>            width="150"/>
>        <s:RadioButton group="{cardtype}"
>            id="masterCard"
>            label="MasterCard"
>            width="150"/>
>        <s:RadioButton group="{cardtype}"
>            id="visa"
>            label="Visa"
>            width="150"/>
>    </s:VGroup>
>
>I am binding my model to an object with id "cardtype" and its
>selectedValue. But if I use groupName how that is going to work?
>
>
>
>On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Not sure what you mean.  How are you doing it now.
>>
>> -Alex
>>
>> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
>>
>> >But how would I bind radiogroups to a model if they wont have "visible"
>> >ids?
>> >
>> >
>> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Binding is internal to a set of instances in an MXML instance.
>> >>  FocusManager looks everywhere.  So unfortunately, that means you
>>can't
>> >>use
>> >> MXML as a template for stamping out copies of radiobuttons.
>> >>
>> >> I would use groupName and set it somehow.
>> >>
>> >> -Alex
>> >> ________________________________________
>> >> From: mark goldin [markzolotoy@gmail.com]
>> >> Sent: Friday, October 11, 2013 2:18 PM
>> >> To: users
>> >> Subject: RadioButtonGroup
>> >>
>> >> I am using the following design pattern from docs for all
>> >> RadioButtonGroups:
>> >>
>> >>  <fx:Declarations>
>> >>         <s:RadioButtonGroup id="cardtype"
>> >>             itemClick="handleCard(event);"/>
>> >>     </fx:Declarations>
>> >>
>> >>     <s:VGroup>
>> >>         <s:RadioButton group="{cardtype}"
>> >>             id="americanExpress"
>> >>             label="American Express"
>> >>             width="150"/>
>> >>         <s:RadioButton group="{cardtype}"
>> >>             id="masterCard"
>> >>             label="MasterCard"
>> >>             width="150"/>
>> >>         <s:RadioButton group="{cardtype}"
>> >>             id="visa"
>> >>             label="Visa"
>> >>             width="150"/>
>> >>     </s:VGroup>
>> >>
>> >> It all works fine. But here is a problem. It looks like if the same
>>id
>> >> is used on different screens then it's going to be the at run time
>> >> which causes problems with tabbing. If I tab from a RadioButtonGroup
>> >> to another control but somewhere on the screen there is another
>> >> RadioButtonGroup the control goes to that RadioButtonGroup. I am also
>> >> not sure how binding is working either since it's the same id that a
>> >> mode property is bound to. But two different controls. Any thoughts?
>> >>
>>
>>


Re: RadioButtonGroup

Posted by mark goldin <ma...@gmail.com>.
Now, I am doing:

<fx:Declarations>
        <s:RadioButtonGroup id="cardtype"
            itemClick="handleCard(event);"/>
    </fx:Declarations>

    <s:VGroup>
        <s:RadioButton group="{cardtype}"
            id="americanExpress"
            label="American Express"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="masterCard"
            label="MasterCard"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="visa"
            label="Visa"
            width="150"/>
    </s:VGroup>

I am binding my model to an object with id "cardtype" and its
selectedValue. But if I use groupName how that is going to work?



On Sun, Oct 13, 2013 at 7:45 PM, Alex Harui <ah...@adobe.com> wrote:

> Not sure what you mean.  How are you doing it now.
>
> -Alex
>
> On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >But how would I bind radiogroups to a model if they wont have "visible"
> >ids?
> >
> >
> >On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Binding is internal to a set of instances in an MXML instance.
> >>  FocusManager looks everywhere.  So unfortunately, that means you can't
> >>use
> >> MXML as a template for stamping out copies of radiobuttons.
> >>
> >> I would use groupName and set it somehow.
> >>
> >> -Alex
> >> ________________________________________
> >> From: mark goldin [markzolotoy@gmail.com]
> >> Sent: Friday, October 11, 2013 2:18 PM
> >> To: users
> >> Subject: RadioButtonGroup
> >>
> >> I am using the following design pattern from docs for all
> >> RadioButtonGroups:
> >>
> >>  <fx:Declarations>
> >>         <s:RadioButtonGroup id="cardtype"
> >>             itemClick="handleCard(event);"/>
> >>     </fx:Declarations>
> >>
> >>     <s:VGroup>
> >>         <s:RadioButton group="{cardtype}"
> >>             id="americanExpress"
> >>             label="American Express"
> >>             width="150"/>
> >>         <s:RadioButton group="{cardtype}"
> >>             id="masterCard"
> >>             label="MasterCard"
> >>             width="150"/>
> >>         <s:RadioButton group="{cardtype}"
> >>             id="visa"
> >>             label="Visa"
> >>             width="150"/>
> >>     </s:VGroup>
> >>
> >> It all works fine. But here is a problem. It looks like if the same id
> >> is used on different screens then it's going to be the at run time
> >> which causes problems with tabbing. If I tab from a RadioButtonGroup
> >> to another control but somewhere on the screen there is another
> >> RadioButtonGroup the control goes to that RadioButtonGroup. I am also
> >> not sure how binding is working either since it's the same id that a
> >> mode property is bound to. But two different controls. Any thoughts?
> >>
>
>

Re: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.
Not sure what you mean.  How are you doing it now.

-Alex

On 10/13/13 10:13 AM, "mark goldin" <ma...@gmail.com> wrote:

>But how would I bind radiogroups to a model if they wont have "visible"
>ids?
>
>
>On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> Binding is internal to a set of instances in an MXML instance.
>>  FocusManager looks everywhere.  So unfortunately, that means you can't
>>use
>> MXML as a template for stamping out copies of radiobuttons.
>>
>> I would use groupName and set it somehow.
>>
>> -Alex
>> ________________________________________
>> From: mark goldin [markzolotoy@gmail.com]
>> Sent: Friday, October 11, 2013 2:18 PM
>> To: users
>> Subject: RadioButtonGroup
>>
>> I am using the following design pattern from docs for all
>> RadioButtonGroups:
>>
>>  <fx:Declarations>
>>         <s:RadioButtonGroup id="cardtype"
>>             itemClick="handleCard(event);"/>
>>     </fx:Declarations>
>>
>>     <s:VGroup>
>>         <s:RadioButton group="{cardtype}"
>>             id="americanExpress"
>>             label="American Express"
>>             width="150"/>
>>         <s:RadioButton group="{cardtype}"
>>             id="masterCard"
>>             label="MasterCard"
>>             width="150"/>
>>         <s:RadioButton group="{cardtype}"
>>             id="visa"
>>             label="Visa"
>>             width="150"/>
>>     </s:VGroup>
>>
>> It all works fine. But here is a problem. It looks like if the same id
>> is used on different screens then it's going to be the at run time
>> which causes problems with tabbing. If I tab from a RadioButtonGroup
>> to another control but somewhere on the screen there is another
>> RadioButtonGroup the control goes to that RadioButtonGroup. I am also
>> not sure how binding is working either since it's the same id that a
>> mode property is bound to. But two different controls. Any thoughts?
>>


Re: RadioButtonGroup

Posted by mark goldin <ma...@gmail.com>.
But how would I bind radiogroups to a model if they wont have "visible" ids?


On Sat, Oct 12, 2013 at 12:18 AM, Alex Harui <ah...@adobe.com> wrote:

> Binding is internal to a set of instances in an MXML instance.
>  FocusManager looks everywhere.  So unfortunately, that means you can't use
> MXML as a template for stamping out copies of radiobuttons.
>
> I would use groupName and set it somehow.
>
> -Alex
> ________________________________________
> From: mark goldin [markzolotoy@gmail.com]
> Sent: Friday, October 11, 2013 2:18 PM
> To: users
> Subject: RadioButtonGroup
>
> I am using the following design pattern from docs for all
> RadioButtonGroups:
>
>  <fx:Declarations>
>         <s:RadioButtonGroup id="cardtype"
>             itemClick="handleCard(event);"/>
>     </fx:Declarations>
>
>     <s:VGroup>
>         <s:RadioButton group="{cardtype}"
>             id="americanExpress"
>             label="American Express"
>             width="150"/>
>         <s:RadioButton group="{cardtype}"
>             id="masterCard"
>             label="MasterCard"
>             width="150"/>
>         <s:RadioButton group="{cardtype}"
>             id="visa"
>             label="Visa"
>             width="150"/>
>     </s:VGroup>
>
> It all works fine. But here is a problem. It looks like if the same id
> is used on different screens then it's going to be the at run time
> which causes problems with tabbing. If I tab from a RadioButtonGroup
> to another control but somewhere on the screen there is another
> RadioButtonGroup the control goes to that RadioButtonGroup. I am also
> not sure how binding is working either since it's the same id that a
> mode property is bound to. But two different controls. Any thoughts?
>

RE: RadioButtonGroup

Posted by Alex Harui <ah...@adobe.com>.
Binding is internal to a set of instances in an MXML instance.  FocusManager looks everywhere.  So unfortunately, that means you can't use MXML as a template for stamping out copies of radiobuttons.

I would use groupName and set it somehow.

-Alex
________________________________________
From: mark goldin [markzolotoy@gmail.com]
Sent: Friday, October 11, 2013 2:18 PM
To: users
Subject: RadioButtonGroup

I am using the following design pattern from docs for all RadioButtonGroups:

 <fx:Declarations>
        <s:RadioButtonGroup id="cardtype"
            itemClick="handleCard(event);"/>
    </fx:Declarations>

    <s:VGroup>
        <s:RadioButton group="{cardtype}"
            id="americanExpress"
            label="American Express"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="masterCard"
            label="MasterCard"
            width="150"/>
        <s:RadioButton group="{cardtype}"
            id="visa"
            label="Visa"
            width="150"/>
    </s:VGroup>

It all works fine. But here is a problem. It looks like if the same id
is used on different screens then it's going to be the at run time
which causes problems with tabbing. If I tab from a RadioButtonGroup
to another control but somewhere on the screen there is another
RadioButtonGroup the control goes to that RadioButtonGroup. I am also
not sure how binding is working either since it's the same id that a
mode property is bound to. But two different controls. Any thoughts?