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 flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> 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 flexcoders@yahoogroups.com, "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!
> >
>

Reply via email to