I tried callLater(selectedValStatus,[data]) as well as updateComplete
and valueCommit on the repeater with no change in behavior. I get rid
of the repeater and write in three static radio buttons, still binding
the group to the model, and it works as it should (not what i wanted
but works = happy client). Still open to ideas to solve though.
<mx:RadioButtonGroup id="statusType"
selectedValue="{model.selectedValuation.valuation_administration.valua
tion_status}"/>
<mx:RadioButton id="open" group="{statusType}" label="Open"
value="Open" />
<mx:RadioButton id="closed" group="{statusType}" label="Closed"
value="Closed" />
<mx:RadioButton id="pending" group="{statusType}" label="Pending"
value="Pending" />
--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
>
> Yes, it's possible that the repeater children are getting
instantiated
> at the same time that your trying to set the selectedValue. Try
running
> selectedValStatus() on the updateComplete or valueCommit event of
the
> repeater. Or, just use callLater(selectedValStatus, data) after
> loadUserData().
>
> -TH
>
> --- In [email protected], "Doug" <doug@> wrote:
> >
> > Check this out Tim,
> > I set up a test group and started building up attributes until it
> > failed. At this point:
> >
> > <mx:RadioButtonGroup id="statusType"
> >
selectedValue="{model.selectedValuation.valuation_administration.valua
> > tion_status}"/>
> > <mx:RadioButton id="tb" group="{statusType}" label="Open"
value="Open"
> > />
> >
> > I have no repeater and it works great, confirming data is on time
and
> > attributes are correct. I even went back to my list data and
retyped
> > the values..just in case whatever.
> >
> > So, is it possible to have a timing issue within the repeater
itself?
> >
> > --- In [email protected], "Tim Hoff" TimHoff@ wrote:
> > >
> > > Might just be a timing issue Doug. Have you tried callLater()?
> > > Otherwise, maybe set
> > > model.selectedValuation.valuationAdmin.valuation_status to the
> > > correct value, instead of setting the selectedValue directly;
since
> > > it's bound.
> > >
> > > -TH
> > >
> > > --- In [email protected], "Doug" <doug@> wrote:
> > > >
> > > > I have a form Item which contains RadioButtonGroup and a
Repeater
> > > > which dynamically loads up RadioButtons from model data, it is
> > > inside
> > > > a VBox container:
> > > >
> > > > <mx:FormItem direction="horizontal">
> > > > <mx:Label text="Status:"/>
> > > > <mx:RadioButtonGroup id="statusType"
> > > >
> > >
> >
selectedValue="{model.selectedValuation.valuationAdmin.valuation_statu
> > > > s}"/>
> > > > <mx:Repeater id="valStatus"
> > > > dataProvider="{listModel.allValuationStatuses}">
> > > > <mx:RadioButton id="vs" group="{statusType}"
> > > > label="{valStatus.currentItem.title}"/>
> > > > </mx:Repeater>
> > > > </mx:FormItem>
> > > >
> > > > On creationComplete() I call init() which in turn calls
> > > > loadUserInfo(). Here I call selectedValStatus and pass on
selected
> > > > data from model:
> > > >
> > > > private function loadUserInfo():void{
> > > > if(model.selectedValuation.valuation_administration != null){
> > > > selectedValStatus
> > > (model.selectedValuation.valuation_administration.val
> > > > uation_status);
> > > > }
> > > > }
> > > >
> > > > selectedValStatus() takes the data object passed to it, loops
over
> > > the
> > > > model list data and then checks to see if the model list data
is
> > > > equivalent to the data.title property, where i then set the
> > > selected
> > > > value of the radio group:
> > > >
> > > > private function selectedValStatus(data:Object):void{
> > > > if(listModel.allValuationStatuses != null){
> > > > for(var i:int = 0; i<listModel.allValuationStatuses.length;
i++){
> > > > var item:ArrayCollection = listModel.allValuationStatuses;
> > > > if(data != null){
> > > > if(item.title == data.title){
> > > > statusType.selectedValue = data.title;
> > > > }
> > > > }
> > > > }
> > > > }
> > > > }
> > > >
> > > > The Behavior:
> > > > Data is present on creation complete.
> > > > I have another radio group using the same code architecture
that
> > > works
> > > > perfectly, is in same form.
> > > > On the form load the radio button is not selected.
> > > > On a view index change and then return the button is selected
> > > > properly.
> > > > Thanks!
> > > >
> > >
> >
>