Hey y'all,

here's my latest puzzler:

I have a form with a radiobuttongroup.

I have a field in a bean that the selectedValue is bound to.  When the bean 
gets updated, and the value in the bean.field matches one of the radiobutton 
values, it sets it properly.  When bean.field is NULL, it leaves the 
last-selected value in the radiobuttongroup.

So...

<code>
[Bindable]
myFormBean:FormBean; //this is set from the container, where it's
                     //bound and included as an attribute of a custom comp.

<mx:RadioButtonGroup id="myButtons" selectedValue="{myFormBean.colorPref}"/>
     <mx:RadioButton id="r" value="RED" label="Red"/>
     <mx:RadioButton id="b" value="BLUE" label="Blue"/>

</code>

When the bean is updated (as the result of a RemoteObject call), it selects one 
of the two radiobuttons.  What it DOESN'T do is clear the group if colorPref == 
null.

I know I can create a reset function... explicitly call .selection=null on all 
my radio buttons when I am about to get new data, but I really want there to be 
a cool binding-way to do this.

Willy 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:6200
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to