2 Replies Latest reply on Mar 31, 2011 7:11 AM by Pham Huy Anh

    Flex ArrayCollection to Java HashSet

    Pham Huy Anh Level 1


      I got a problem that I cannot resolve by googleing. I need your     expertise:

      Here s the part of the story:

      1 Bdc have many BdcDetails, so in Flex Bdc.as ==>       public var bdcdetails:ArrayCollection; in Java Bdc.java       ==> private Set<BdcDetails> bdcdetails = new       HashSet<BdcDetails>();

      It works perfectly in Flex which means Flex understand what is     inside a Java HashSet. But when a Bdc is sent to Java. Java don't     understand what is inside ArrayCollection, everything is ASObject.     So ((BdcDetails)bdc.getBdcdetails().toArray()[0]) ==> give       ClassCastException

      Please help! Thanks


      P/S: I am using Blaze DS