I am using Model to bind form's data to a combobox and trying to use 
same model to send modified data back. Here are some snippets:
Form:
<mx:FormItem label="Divisions">
  <customComponents:comboItemRenderer labelField="name"
        selectedIndex="{modelGeneral.division}"                 
        change="{modelGeneral.division=divisions.selectedIndex};"     
        id="divisions"></customComponents:comboItemRenderer>
</mx:FormItem>

Model:
private var _division:int = 0;
[Bindable]
public function get division():int
{
      return _division;
}
public function set division(division:int):void
{
      _division = division;
}
I also have code that will initially set the correct combo's value 
based on selectedIndex.
So, as far as I understand modelGeneral.division stores combo's 
selectedIndex during a time of user's interaction with the combobox.
But when I want to save I need to send to the server a value of a key 
field, not the selectedIndex. Do I need again manually code a change 
to modelGeneral.division in order to store actual data from the combo 
before data is sent to the server?

Thanks for help

Reply via email to