Hi.
I have a master detail setup.
When I click the master item and the details are editable in the detail
section,
I need to bind them (the object's properties) to the relevant textinput fields
so that when I save the object, the details I've entered go to the server.
I have a setter that sets the object in the detail when it's selected in the
master.
public function set premise(p:Premise):void {
_premise = p;
if (_premise.premiseId != 0) { //not a new premise
//do stuff
}
doBinding();
}
//bind to text input fields
public function doBinding():void {
BindingUtils.bindProperty(_premise,"name",premiseName,"text");
BindingUtils.bindProperty(_premise,"street",premiseStreet,"text");
BindingUtils.bindProperty(_premise,"suburb",premiseSuburb,"text");
BindingUtils.bindProperty(_premise,"state",premiseState,"text");
BindingUtils.bindProperty(_premise,"postcode",premisePostcode,"text");
}
However the binding only works for the first premise, then when I select a
premise in the master, this selection and consecutive selections set the
premises in the array to all be the same premise.
Any suggestions?
Kr.
Luke.
--
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422