Luciano,

Thanks it worked for List<ClassX> but not for Map<String, List<ClassB>>. How do 
we convert this map to AS3?

Luciano Manerich Junior <[EMAIL PROTECTED]> wrote:                              
  
You MUST import the classes used into the  ArrayCollection.
  
 Or, you may use the ArrayElementType, for the auto-import at the compiler  
time.
  
  
 public class LookupData  {     
         [ArrayElementType("package.ClassA")]
         public var attributeA:ArrayCollection;
         [ArrayElementType("package.ClassB")]
         public var attributeB:ArrayCollection;
         [ArrayElementType("package.ClassB")]
         public var attribute1:ArrayCollection;
         [ArrayElementType("package.ClassC")]
         public var attribute2:ArrayCollection;
         [ArrayElementType("package.ClassD")]
         public var attribute3:ArrayCollection;
     }

  

  
---------------------------------
 De: [email protected]  [mailto:[EMAIL PROTECTED] Em nome de ibo
Enviada em:  quinta-feira, 8 de maio de 2008 14:51
Para:  [email protected]
Assunto: [flexcoders] value object binding  problem


 
  I have this VO binding from java to  as3:

------------------------
JAVA / JDK6 -  LookupStuff.java

public class LookupStuff {
     private List<ClassA> attributeA;
    private  List<ClassA> attributeB;  
    private  Map<String, List<ClassB>> attribute1;
    private  Map<String, List<ClassC>> attribute2;
    private  Map<String, List<ClassD>> attribute3;
     
    ...setter/getters...
}     

-------------------------
AS3 -  LookupStuff.as

     [RemoteClass(alias="my.java.package.LookupStuff")]     
    import  mx.collections.ArrayCollection;
         
    [Bindable]    
&nbs p;    public class LookupData {         
        public var  attributeA:ArrayCollection;
         public var  attributeB:ArrayCollection;
         public var  attribute1:ArrayCollection;
         public var  attribute2:ArrayCollection;
         public var attribute3:ArrayCollection;
     }
----------------------------------
         private function myHandler(event:ResultEvent):void  {
            var  lookup:LookupStuff = event.result as  LookupStuff;
             // lookup is null! why???
         }
----------------------------
Im getting null when my  actionscript handler (thru RemoteObject / ResultEvent) 
finally gets  event.result. Anybody knows why? Can a Map<> and List<> 
interfaces  easily maps to an AS3 ArrayCollection?

I've verified that my java code is  returning a good return value (not null).


 
 

---------------------------------
 Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try  it 
now. 

 
     
                                       

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Reply via email to