3 Replies Latest reply on Aug 28, 2008 5:13 AM by Ventis85

    How to cast an ArrayCollection in an ArrayCollection

    Ventis85 Level 1
      Hi everyone,

      currently I'm working on a Flex-Java project. Repeatedly I've received a List from the Java-side which I always cast as an ArrayCollection because List is a Control in Flex. This has always worked perfectly.

      However, now we find ourselves in the situation were I'm passed a List from Java with Lists inside it. When I cast my result as an ArrayCollection:
      nameArrayCollection = event.result as ArrayCollection
      it gives me an ArrayCollection with Objects in it, which contain all fields except the list inside the objects.

      Unless someone has another explanation for this, I think it's because I don't cast the lists in the List as an ArrayCollection, so it simply gets ignored during decoding because Flex doesn't know a List (besides the control).

      Any ideas about how I can cast the lists inside the ArrayCollection as ArrayCollections, or any other solutions?

      Thx in advance