0 Replies Latest reply on Jun 4, 2008 1:10 PM by prat_dev

    Flex RPC mapping Java nested classes to ActionScript classes

    prat_dev
      We are calling a Java method in our project using RemoteObject the value returned by the java method is a ArrayList containing instances of a class say ParentClass with some nested classes.
      The structure of ParentClass(Java) is something like this
      class ParentClass {
      ..
      //some primitives
      ..
      private ChildClassA childAInstance;
      private ChildClassB childBInstance;
      ...
      //getters setters
      }
      We have created similar class structure on the ActionScript side, the ActionScript classes(ParentClass,ChildClassA ,ChildClassB) have been properly annotated with the [RemoteClass] metadata tag,
      The problem is that though i'm getting the primitive data members of the ParentClass through RPC in my corresponding AS ParentClass class i'm getting an runtime exception trying to access ChildClassA,ChildClassB members.
      Am i missing something, exactly the same scenario is mentioned in this article
      http://www.adobe.com/devnet/flex/articles/complex_data.html
      But the Object.registerClass method mentioned in the tutorial is giving me compilation error, the sample code attached with the article is corrupt zip too.
      Please help me out on this