I am giving this a try on my current app.  However, when the data is returned 
to Flex, it is not of the type that I specified.  All fields are camelCased 
correctly (I added the properties argument to get around the uppercasing 
issue), the type is set correctly, and all data is returned, but it is not of 
type "AddressBook".  If I do <cfreturn createObject( "component", "AddressBook" 
).init( arguments.id ) /> the data is returned as "AddressBook".  Any ideas?  
(Code is below).

<cffunction name="getAllProperties" output="false" access="remote">
        <cfargument name="queryData" type="query" required="true" />
        <cfargument name="properties" type="string" required="false" 
default="addressBookId,ownerId,connectionSourceId,addressTypeId,address1,address2,city,state,zip,countryId,longitude,latitude,radianLat,radianLong,lastUpdate,lastUpdateBy,lastUpdateByConnectionSourceId"
 />

        <cfset var INST = structNew() />
        <cfset INST.obj = structNew() />
        <cfset INST.ret = arrayNew( 1 ) />

        <!---  default object to addressbook --->
        <cfset INST.obj['__type__'] = "AddressBook" />
        <!--- loop over query --->
        <cfloop query="arguments.queryData">
                <!--- loop over columns and assign to temporary object --->
                <cfloop list="#arguments.properties#" index="INST.property">
                        <cfset INST.obj[INST.property] = 
arguments.queryData[INST.property][currentRow] />
                </cfloop>
                <cfscript>
                        ArrayAppend( INST.ret, duplicate( INST.obj ) );
                </cfscript>
        </cfloop>
                
        <cfreturn INST.ret />
</cffunction> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299343
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to