I'm trying to pass an object back to a cfc via RemoteObject and can't
get a favorable resolution, please look this over and let me know if
you see my error?

The error I am getting seems to imply that either the object is not
being sent or it's not arriving correctly. (How does ColdFusion
receive an object? Should I be using some other type (struct, array,
etc.)?)

Al

The object is a collection of name/value pairs and is defined.

This is the ActionScript part:

//this is the creation of the object
var eventTransfer:Object = modelEvent.transferObject;

public var svcEvent:RemoteObject = new RemoteObject();
public function useRemoteObject(eventTransfer:Object):void{
svcEvent.destination ="ColdFusion";
svcEvent.source = "EventComp";
svcEvent.qryEventData.addEventListener("result", resultHandler);
svcEvent.qryEventData.addEventListener("fault", faultHandler);
svcEvent.qryEventData(eventTransfer);
}

This is the CFC:
<cfcomponent name="EventComp">

<cffunction name="qryEventData" access="remote" returnType="query">
<cfargument name="eventTransfer" type="struct" required="yes"/>
<cfparam name="eventTransfer" type="any" default="not_passed"/>

<cfif eventTransfer is not "not_passed">
<cfset eventName = eventTransfer.eventName>
<cfset eventLocation = eventTransfer.eventLocation>
<cfset contactName = eventTransfer.contactName>

<cfquery datasource="Roster" name="newEvent" debug="yes">
INSERT INTO tblEvents
(eventName, eventLocation, contactName)
VALUES (#eventName#, #eventLocation#, #contactName#)
</cfquery>
</cfif>
<cfquery datasource="Roster" name="event" debug="yes">
SELECT * FROM tblEvents
</cfquery>
// this if statement is just so I can tell if the parameter is really
passed or not.
<cfif eventTransfer is "not_passed">
<cfquery datasource="Roster" name="event" debug="yes">
SELECT * FROM tblEvents WHERE eventName = "NSCW"
</cfquery>
</cfif>
<cfreturn event>
</cffunction>
</cfcomponent> 





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

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



Reply via email to