| AVIS IMPORTANT | WARNING |
Les informations contenues dans le present document etses pieces jointes sont strictement confidentielles et reservees a l'usagede la (des) personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, distribution, copie, ou autre utilisation de ces informations est strictement prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur et detruire ce document sans en faire de copie sous quelque forme. | The information contained in this document and attachments is confidential and intended only for the person(s) named above. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, or any other use of the information isstrictly prohibited. If you have received this document by mistake, pleasenotify the sender immediately and destroy this document and attachments without making any copy of any kind. |
Ok, I have a little
dilemma
Say you have a
ComboBox which has a list of credit card type, which is populate via a remote
call: myCombo.dataProvider =
myCCList;
No problem, that
works and it is populated. Each element in the list is an object with two fields, "id" and "name". Except the first element is empty, id=0 and
name="".
And this combo is
tied to a validation, like so:
<mx:Model
id="myModel'>
<cardType>{myCombo.selectedItem.id}</cardType>
</mx:Model>
<mx:NumberValidation field="myModel.cardType"
notANumber="Please select an item in the
list."/>
Say, I want to set
the selected item of the combo once the user comes to that screen:
myCombo.selectedIndex = 4;
All good up to
now.
Except, the red
validation indication will be set around the ComboBox, which is
incorrect, I have selected a valid element in the combo by the
(myCombo.selectedIndex = 4) code. Once I set change the selected item to another value, all is good.
What I noticed, is
that if I retrieve the folowing value:
-myCombo.selectedItem.id is equal
to "5" let's
say
- myModel.cardType is equal to "undefined ".
So some databinding
is not executing? Is that it?
Jimmy Gianninas - Software
Developer
Optimal Payments
Inc.

