This is an involved discussion with much to consider...

Your request goes something like this when calling CFCs via
RemoteObject:

Flex -> Flash -> AMF -> (AMF Gateway/Flash Remoting) -> ColdFusion ->
Your CF Page

In ActionScript 1.0, the Flash <-- --> AMF interation is case
insensitive merely because ActionScript 1.0 is case insensitive. Java,
on the other hand, always treats properties case sensitively. Flash
Remoting MX uses a convention of lowercase keys to force case
insensitivity in the Java representations of ActionScript objects.
ColdFusion has always been case insensitive - (however, how CF exposes
this to your code versus how objects are passed around internally is
involved) - so it didn't care whether the Java versions of these AMF
objects had lowercase keys.

In ActionScript 2.0, the Flash <-- --> AMF interaction became case
sensitive. A switch was introduced in Flex to stop the AMF gateway from
lowercasing keys. This setting is in /WEB-INF/flex/gateway-config.xml
and by default set to false to preserve the case of properties. Again,
ColdFusion code didn't care as it was case insensitive.


However, the response gets more interesting. Your response might look
like this:

ColdFusion -> (AMF Gateway/Flash Remoting) -> AMF -> Flash -> Flex

In the simplest of cases, when ColdFusion passes database information
back to Flash Remoting it may do so without subjecting the objects to CF
specific "upper casing"  (perhaps if you just return a query object).
However, I imagine it is possible that when your code preprocess the
results to form a new structure the variables may actually get forced to
uppercase by CF (I'm not a CF engineer... but it sounds, theoretically,
possible)?

NOTE: as long as the switch is set in Flex to not lowercase keys, I
imagine it will pass through data properties just as ColdFusion sent the
result to the AMF Gateway.

(A more complicated case that I'm assuming doesn't affect you here is
when this switch has been changed to true to lowercase keys in the
gateway - a fix was made in CFMX 7 to handle this situation to still
preserve response property case to the form in which CF returned them).


-----Original Message-----
From: Scott Barnes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 22, 2005 6:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Remoting has UPPERCASE results



I noticed in:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19356

It states:

"...With Flash Remoting, they are returned in exactly the same case as
they are typed. For example, if you returned a query with two columns,
(FirstName, LastName), when ColdFusion returns the data through a web
service call, the columns will be all uppercase, (FIRSTNAME,
LASTNAME). If Flash Remoting is used to return the data, then the
columns will appear exactly as they appear in the database,
(FirstName, LastName). MXML is case sensitive, so it is possible that
you may run into a problem with case sensitivity..."

Yet, I just spent the last 10mins trying to figure out why my bindings
weren't working - turns out  the struct I return from CFMX is now
uppercase in FLEX - instead of case sensitive which the technote
states.

Personally i prefer uppercase in the end as that way i'm now coupling
my FLEX stuff with how a developer in CFMX typed his variables.


-- 
Regards,
Scott Barnes
http://www.mossyblog.com
http://www.flexcoder.com (Coming Soon)


 
Yahoo! Groups Links



 





 
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