2 Replies Latest reply on May 15, 2009 9:41 AM by lravinarayanan

    Remote Object in Flex

    lravinarayanan Level 1

      i want to use an object of another class within a class. how do we do that in Flex?

      here is one example of how i am currently doing it.























      import asclass.CrmUser; //another clas that i am importing






      public class AuditTrailAs




           public var action:String;



           public var crmUserByUsername:CrmUser; //creating the object of that class



           public var timeOfAction:String;



           public var description:String;





           public function AuditTrailAs(){}



      the problem is when i run my application, the value for crmUserByUsername is null, even though my java method is returning it correctly.


      Thanks and regards.

        • 1. Re: Remote Object in Flex
          _Natasha_ Level 4



          do you ahve the same mapping for asclass.CrmUser ?

          It's not hte simple object, so it's also need to know the class on server side.

          • 2. Re: Remote Object in Flex
            lravinarayanan Level 1


























            package asclass



















            public class CrmUser





            public var userId:int;




            public var username:String;




            public var firstName:String;




            public var middleName:String;




            public var lastName:String;




            public var userType:String;




            public var primaryPhoneNumber:String;




            public var secondaryPhoneNumber:String;




            public var password:String;




            public var primaryEmailId:String;




            public var secondaryEmailId:String;




            public var status:Boolean;




            public var street:String;




            public var state:String;




            public var country:String;




            public var pincode:int;





            public function CrmUser(){}


            this is the CrmUser class.