Hi Abdul,

One more thing I had noticed that the private variables with getter
and setter methods run fine with Java. 
What I understood is that for Java the flash gateway calls the get/set
method and return the object. Is this a problem with gateway for CF?

Thanks,
Deepak

--- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]> wrote:
>
> Well, I don't see anything you are doing in getters/setters except
> setting values.
>  
> I know, if you are a OO purist then you might want to have
> getters/setters everywhere. For me, it makes sense wherever it is
> required, f.ex. where you want to validate the data before setting it or
> returing it.
>  
> In case of ValueObject, we generally don't have a much business-logic
> inside them, so getters/setters dont make much sense.
>  
> -abdul
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of deepu_verma
> Sent: Wednesday, January 25, 2006 1:46 AM
> To: [email protected]
> Subject: [flexcoders] Re: Value objects
> 
> 
> Thanks for the Reply
> But don't you think by declaring the variables as public we are
> defeating the object encapsulation concept.
> And moreover then there  would be no need to define the getter and
> setter methods for the class.
> 
> 
> Thanks and Regards
> dv
> 
> --- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >  
> > There are two things:-
> >  
> > * I think, variables in actionscript should be in captial-case because
> > the Coldfusion remoting adapter sends all variables in capital case.
> > * Second, though I am not sure, variables in actionscript should be
> > public.
> >  
> > Use the following code and let us know if it works.
> > 
> > -abdul
> >  
> >  
> >  
> > import org.nevis.cairngorm.vo.ValueObject;
> >  
> > class com.macromedia.webreqapp.vo.UserVO implements ValueObject
> > {
> >       public static var registered:Boolean =
> > Object.registerClass("webreqapp.webrequest.vo.user",
> > com.macromedia.webreqapp.vo.UserVO );
> >  
> >       public function setUserID(userID:Number):Void
> >       {
> >             this.USERID = userID;
> >       }
> >       
> >       public function getUserID():Number
> >       {
> >             return USERID
> >       }
> >       
> >       public function setName(name:String):Void
> >       {
> >             this.NAME = NAME;
> >       }
> >       
> >       public function getName():String
> >       {
> >             return NAME;
> >       }
> >       
> >       public function setEmail(email:String):Void
> >       {
> >             this.EMAIL = email;
> >       }
> >       
> >       public function getEmail():String
> >       {
> >             return EMAIL;
> >       }
> >       
> >       public function setPassword(password:String):Void
> >       {
> >             this.PASSWORD = password;
> >       }
> >       
> >       public function getPassword():String
> >       {
> >             return PASSWORD;
> >       }
> >       public function setRole(role:String):Void
> >       {
> >             this.ROLE = role;
> >       }
> >       
> >       public function getRole():String
> >       {
> >             return ROLE;
> >       }
> >       public var USERID:Number;
> >       public var NAME:String;
> >       public var EMAIL:String;
> >       public var PASSWORD:String;
> >       public var ROLE:String;
> > }
> > 
> > 
> >  
> > 
> > ________________________________
> > 
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of deepu_verma
> > Sent: Tuesday, January 24, 2006 5:58 PM
> > To: [email protected]
> > Subject: [flexcoders] Value objects
> > 
> > 
> > I am stuck up with how to map VO between flex and Coldfusion
> > My AS class is 
> > import org.nevis.cairngorm.vo.ValueObject;
> > class com.macromedia.webreqapp.vo.UserVO implements ValueObject
> > {
> >       public static var registered:Boolean =
> > Object.registerClass("webreqapp.webrequest.vo.user",
> > com.macromedia.webreqapp.vo.UserVO );
> > 
> >       public function setUserID(userID:Number):Void
> >       {
> >             this.userID = userID;
> >       }
> >       
> >       public function getUserID(Void):Number
> >       {
> >             return userID
> >       }
> >       
> >       public function setName(name:String):Void
> >       {
> >             this.name = name;
> >       }
> >       
> >       public function getName(Void):String
> >       {
> >             return name;
> >       }
> >       
> >       public function setEmail(email:String):Void
> >       {
> >             this.email = email;
> >       }
> >       
> >       public function getEmail(Void):String
> >       {
> >             return email;
> >       }
> >       
> >       public function setPassword(password:String):Void
> >       {
> >             this.password = password;
> >       }
> >       
> >       public function getPassword(Void):String
> >       {
> >             return password;
> >       }
> >       public function setRole(role:String):Void
> >       {
> >             this.role = role;
> >       }
> >       
> >       public function getRole(Void):String
> >       {
> >             return role;
> >       }
> >       private var userID:Number;
> >       private var name:String;
> >       public var email:String;
> >       private var password:String;
> >       private var role:String;
> > }
> > My coldfusion code is 
> > <cffunction name="signin" access="remote"  >
> >       <cfargument name="user" type="any" required="yes"> 
> > 
> >             <cfobject type="JAVA" class="flashgateway.io.ASObject"
> > name="myclass" action="CREATE" >
> >             <cfset myObj = myclass.init()> 
> >             <cfset
> myobj.setType("com.macromedia.webreqapp.vo.UserVO")>
> >             <cfset myobj.put("email", "test")>
> >             <cfset myobj.put("password", "test")>
> >             <cfreturn myobj>
> >       </cffunction>
> > How will the returned data from CF be automatically mapped to the
> > flash VO.
> > Any help is greatly appreciated
> > 
> > Thanks
> > Deepak
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> > 
> > 
> > 
> > 
> > SPONSORED LINKS 
> > Web site design development
> >
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> >
> site+design+development&w2=Computer+software+development&w3=Software+des
> >
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> > tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>        Computer software
> > development
> >
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> >
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> >
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> > actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>        Software design
> and
> > development
> >
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> >
> Web+site+design+development&w2=Computer+software+development&w3=Software
> >
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> > practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>        
> > Macromedia flex
> >
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> >
> development&w2=Computer+software+development&w3=Software+design+and+deve
> >
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> > 66&.sig=OO6nPIrz7_EpZI36cYzBjw>        Software development best
> > practice
> >
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&;
> >
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> >
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> > st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>        
> > 
> > ________________________________
> > 
> > YAHOO! GROUPS LINKS 
> > 
> > 
> >       *      Visit your group "flexcoders
> > <http://groups.yahoo.com/group/flexcoders> " on the web.
> >         
> > *      To unsubscribe from this group, send an email to:
> >       [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]> 
> >         
> > *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/> . 
> > 
> > 
> > ________________________________
> >
> 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
> 
> 
> ________________________________
> 
> YAHOO! GROUPS LINKS 
> 
> 
>       
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>         
> *      To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
> 
> ________________________________
>









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to