Can you show us the code where you import com.beans.Sale and show how it is 
actually referenced in your code so a compile time dependency exists on the 
class and thus ensures it is linked into the SWF?

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of André 
Rodrigues Pena
Sent: Tuesday, May 29, 2007 6:24 AM
To: [email protected]
Subject: Re: [flexcoders] RemoteClass



Michael, thanks for your reply.
Actually I have already realized that the applications with strong reference 
map correctly. But it's so weird that I thought there could be something like 
this:
DataService.mapClass (Sale);
Adobe should take a look at this.


On 5/29/07, Michael Herron <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > 
wrote: 

        

        Have you strongly reference the com.beans.Sale class in your 
Application? Your RemoteClass meta-data looks fine, but if you've not got a 
hard reference to the class inside your flex app, it won't be compiled in to 
the SWF and won't be mapped correctly at runtime. You can get round this by 
just adding an unused variable somewhere of type com.beans.Sale. (there maybe a 
more elegant way to get round this).

         

        
________________________________


        From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com 
<http://ups.com> ] On Behalf Of André Rodrigues Pena
        Sent: 28 May 2007 12:48
        To: [email protected]
        Subject: [flexcoders] RemoteClass

         

        

        Hi all,
        
        I have a Java service that returns an ArrayList of type Sale.
        At the Flex application I also have the type Sale, the simplifyed
        version is this:
        
        package beans
        {
        [Managed]
        [RemoteClass(alias="com.beans.Sale")]
        public class Sale {
        public var id:int;
        public var customer:Customer;
        public var product:Product;
        }
        }
        
        Although, when I trigger the RemoteObject to retrieve the ArrayList of
        Sales (ICollectionView at client), Flex seems to be treating it as a
        collection of Object, not Sale.
        
        Is this conversion (Object -> Sale) to be done automatically? What's 
wrong?
        thanks
        
        -- 
        André Rodrigues Pena
        
        LOCUS
        www.locus.com.br

        

        

        




-- 
André Rodrigues Pena

LOCUS
www.locus.com.br <http://www.locus.com.br> 


 

Reply via email to