This content has been marked as final. Show 3 replies
How is "deductionInputArray" being populated? Can you wrap it in an ArrayCollection?
deductionInputArray is being populated as the mx:Repeater executes for each item in its dataProvider - in this case, lets say I have 4 items in that dataProvider which the mx:Repeater will then create 4 textInputs. deductionInputArray will then have a length of 4 and each item will be a reference to the corresponding TextInput. I can access the value of, let's say the 3rd TextInput, by the following: deductionInputArray .text.
However, the problem I'm having is that Flex doesn't allow you to bind to array items with square brackets. I'm not sure if there is a way to convert that array(deductionInputArray) that gets created by the repeater into an ArrayCollection so I can use getItemAt(x) methods in the binding. Otherwise, I think I will have to just loop through the deductionInputArray array on submit and manually update the model - which elliminate the need for any bindings.
Thoughts? It looks like this might be a deficiency of Flex bindings and repeated text inputs unless I am missing something - which is certainly possible. Any suggestions would be appreciated!
The problem is that you can't bind to a plain array.
If you are doing this to build a request object to send to a data service, than I'd say forget the binding and build the request object programmatically. Binding is supposed to make life simpler. If you have to jump through hoops to make it work, you've lost the benefit.