This content has been marked as final. Show 4 replies
I have this problem too. Anyone ever find a fix for this?
You might try something like:
queueCol = new ArrayCollection(event.result.Response.CallQueue.QueueItem is Array?event.result.Response.CallQueue.QueueItem:[event.result.Response.CallQueue.QueueIte m]);
The SimpleXMLDecoder starts of converting a child node to a property, but if there's already something there, it converts it to an array. So flex doesn't have any problem reconciling xml with single child node - it is making a best guess in the absence of an xml schema. You can write your own decoder if you like (this is what I have done), and hand it to the HTTPService to use in place of the default. Then you can make it read a schema (if you have one).
I am having the same problem...seems pretty ugly and you would have thought passing a collection containing one element to a control would work :(
I have noticed books only give examples where XML with more than 1 node is used...always the way :)
Has an easier solution been discovered at all?