flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Re: RadioButtonGroup
Date Tue, 15 Oct 2013 10:01:55 GMT
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 <aharui@adobe.com> wrote:

> https://issues.apache.org/jira/browse/FLEX
>
> On 10/14/13 10:17 AM, "mark goldin" <markzolotoy@gmail.com> wrote:
>
> >What's a link to the bug system?
> >
> >
> >On Mon, Oct 14, 2013 at 10:28 AM, Alex Harui <aharui@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" <markzolotoy@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 <aharui@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" <markzolotoy@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 <aharui@adobe.com>
> >>wrote:
> >> >> >
> >> >> >> Not sure what you mean.  How are you doing it now.
> >> >> >>
> >> >> >> -Alex
> >> >> >>
> >> >> >> On 10/13/13 10:13 AM, "mark goldin" <markzolotoy@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 <aharui@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?
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message