Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-26 Thread Tom Chiverton
On Thursday 26 Jun 2008, holmgren.eric wrote:
 That was the ticket! For some reason the AS to CF wizard in FB3 puts
 all the properties in the variables scope.

Not the one I've got here, unless I choose a private property scope.
I also don't use the get/set generation either. It's just a VO.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/



[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread holmgren.eric
Tom,

The methods I'm referring to are the getter/setter and init methods in
the cfc. Say I pass a vo.TestVO AS class with the properties value1,
value2, etc to ColdFusion via remoting. When I dump the arguments
variable scope in the cfc called by the remote object, the vo.TestVO
object exists as the first parameter, but it only has the previously
mentioned methods, and no properties.



[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread holmgren.eric
The Flex and ColdFusion code is here:
http://coldfusion.pastebin.com/m640b8baa

Sending a typed object from CF to Flex works as it should. Sending
from Flex to CF strips off all of the properties and only assigns the
methods present in the aliased cfc.



RE: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread Battershall, Jeff
Eric,

You have to use the this keyword in order to make your properties
public.  Using the variables scope keeps your properties private
inside the CFC.

So your code needs to read:

cfscript
//Initialize the CFC with the default properties values.
this.value1 = ;
this.value2 = ;
this.value3 = ;
this.value4 = ;
/cfscript

Just using the CFPROPERTY tag isn't enough.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of holmgren.eric
Sent: Wednesday, June 25, 2008 3:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems passing value objects between Flex
and CF


The Flex and ColdFusion code is here:
http://coldfusion.pastebin.com/m640b8baa

Sending a typed object from CF to Flex works as it should. Sending from
Flex to CF strips off all of the properties and only assigns the methods
present in the aliased cfc.




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





Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread Jeffry Houser
Have you tried setting the type to just TestVO in the setMyTestVO ?
Also it won't hurt if you add an alias tag to the CFC.  I believe this 
is the correct syntax:

cfcomponent name=components.test.TestVO output=false alias=vo.TestVO

holmgren.eric wrote:
 The Flex and ColdFusion code is here:
 http://coldfusion.pastebin.com/m640b8baa

 Sending a typed object from CF to Flex works as it should. Sending
 from Flex to CF strips off all of the properties and only assigns the
 methods present in the aliased cfc.


 

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




   

-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711  | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com 
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com 




[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread holmgren.eric
Jeff,

That was the ticket! For some reason the AS to CF wizard in FB3 puts
all the properties in the variables scope.

Thanks,

Eric



Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-25 Thread Douglas Knudsen
this is ok if you are not trying to cfdump a instance of it.  You
should be able to cfoutput a getPropertyName().  Think about one of
the points of using mutator/accessor pairs.


DK

On Wed, Jun 25, 2008 at 10:01 PM, holmgren.eric [EMAIL PROTECTED] wrote:
 Jeff,

 That was the ticket! For some reason the AS to CF wizard in FB3 puts
 all the properties in the variables scope.

 Thanks,

 Eric

 



-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-24 Thread holmgren.eric
I guess I may be a little confused about how the aliases are supposed
to work then. Take the following example:

In flex builder I have a project named Test with the following
hierarchy that's set to run from wwwroot/Test-debug/ on the local CF
server ...

+ Test
+ bin-debug
+ html-template
+ libs
+ src
main.mxml
+ vo
VO.as

On the ColdFusion side I have a folder in wwwroot with my components ...

+ wwwroot
+ components
VO.cfc

How should I set the aliases in Flex and CF when they don't share the
same path?

Thanks,

Eric




Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-24 Thread Jeffry Houser

 Was there a problem you were having with setting the aliases that you'd 
like to share? 

  In the CFC your alias will be vo.VO 
  In the AS file the alias will be components.VO 

 Keep the paths case sensitive. 

holmgren.eric wrote:
 I guess I may be a little confused about how the aliases are supposed
 to work then. Take the following example:

 In flex builder I have a project named Test with the following
 hierarchy that's set to run from wwwroot/Test-debug/ on the local CF
 server ...

 + Test
 + bin-debug
 + html-template
 + libs
 + src
 main.mxml
 + vo
 VO.as
 
 On the ColdFusion side I have a folder in wwwroot with my components ...

 + wwwroot
 + components
 VO.cfc

 How should I set the aliases in Flex and CF when they don't share the
 same path?

 Thanks,

 Eric



 

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




   

-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711  | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com 
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com 




Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-24 Thread Douglas Knudsen
The AS file's remoteobject metadata should have alias point to the CFC
using full dot-path notation.  The alias attribute on the CFC is not
required, but would be this same path.  You don't specify the path to
your AS object anywhere, would kind of defeat a few things that.
would, eh?

http://www.jeffryhouser.com/index.cfm/2007/10/9/Why-does-ColdFusion-return-a-CFC-to-Flex-as-a-generic-object
 :)  See Tom's comments thereBTW, your site is appears to be down
currently Jeff.

DK

On Tue, Jun 24, 2008 at 4:39 PM, Jeffry Houser [EMAIL PROTECTED] wrote:

 Was there a problem you were having with setting the aliases that you'd
 like to share?

 In the CFC your alias will be vo.VO
 In the AS file the alias will be components.VO

 Keep the paths case sensitive.

 holmgren.eric wrote:
 I guess I may be a little confused about how the aliases are supposed
 to work then. Take the following example:

 In flex builder I have a project named Test with the following
 hierarchy that's set to run from wwwroot/Test-debug/ on the local CF
 server ...

 + Test
 + bin-debug
 + html-template
 + libs
 + src
 main.mxml
 + vo
 VO.as

 On the ColdFusion side I have a folder in wwwroot with my components ...

 + wwwroot
 + components
 VO.cfc

 How should I set the aliases in Flex and CF when they don't share the
 same path?

 Thanks,

 Eric



 

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






 --
 Jeffry Houser
 Flex, ColdFusion, AIR
 AIM: Reboog711 | Phone: 1-203-379-0773
 --
 Adobe Community Expert
 http://www.adobe.com/communities/experts/members/JeffryHouser.html
 My Company: http://www.dot-com-it.com
 My Podcast: http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com

 



-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


Re: [flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-24 Thread Jeffry Houser


Server problems that I can't track down unfortunately.  This is the 
second Failure today.  : grumbles:  I'll spare the list from all the 
gory details. 


But, thanks for the link anyway. ;)

Douglas Knudsen wrote:

The AS file's remoteobject metadata should have alias point to the CFC
using full dot-path notation.  The alias attribute on the CFC is not
required, but would be this same path.  You don't specify the path to
your AS object anywhere, would kind of defeat a few things that.
would, eh?

http://www.jeffryhouser.com/index.cfm/2007/10/9/Why-does-ColdFusion-return-a-CFC-to-Flex-as-a-generic-object
 :)  See Tom's comments thereBTW, your site is appears to be down
currently Jeff.

DK

On Tue, Jun 24, 2008 at 4:39 PM, Jeffry Houser [EMAIL PROTECTED] wrote:
  

Was there a problem you were having with setting the aliases that you'd
like to share?

In the CFC your alias will be vo.VO
In the AS file the alias will be components.VO

Keep the paths case sensitive.

holmgren.eric wrote:


I guess I may be a little confused about how the aliases are supposed
to work then. Take the following example:

In flex builder I have a project named Test with the following
hierarchy that's set to run from wwwroot/Test-debug/ on the local CF
server ...

+ Test
+ bin-debug
+ html-template
+ libs
+ src
main.mxml
+ vo
VO.as

On the ColdFusion side I have a folder in wwwroot with my components ...

+ wwwroot
+ components
VO.cfc

How should I set the aliases in Flex and CF when they don't share the
same path?

Thanks,

Eric





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





  

--
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711 | Phone: 1-203-379-0773
--
Adobe Community Expert
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com







  


--
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711  | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com 
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com 



[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-24 Thread holmgren.eric
I have my VO's coming back fine from CF to Flex, but when I try and
send them from Flex to CF, I only get a VO with methods and no properties.



[flexcoders] Re: Problems passing value objects between Flex and CF

2008-06-17 Thread holmgren.eric
Problem solved:

testVO = CreateObject(component, components.test.TestVO);
testVO.init();

in TestRO.cfc should have been ...

testVO = CreateObject(component, components.test.TestVO).init();

I don't think the alias was being initialized correctly previously.

Eric