Web Design Resources & Tutorials to help you design the best website!
SherifAbdou.com is a web design blog that we created with goal of provoking inspiration to other designers & webmasters all over the internet

This Example uses the RemoteObject Class/MXML Tag in Flex to send some parameters to a ColdFusion CFC file, the ColdFusion CFC file then processes the parameters that Flex sent it then sends the results back which we display in Flex. The Example is simple and straightforward and you can use this as a stepping stone to create bigger applications. You can, for example query up a Database from ColdFusion then have flex send some parameters which ColdFusion can take and determine for example to delete,insert,filter, something from the Database. A couple of things you need to take note of. 1) You must set the destination=”ColdFusion” or you will get this error:
[RPC Fault faultString="[MessagingError message='The MessageAgent's destination must be set to send messages.']” faultCode=”InvokeFailed” faultDetail=”Couldn’t establish a connection to ””]
Also When you drill down to the CFC file make sure that you are Starting from where the root of your site is and to also include the src Folder in flex. So For Example myExample.src.ThisIsTheCFCFile, DO NOT put the .cfc Extension. Here is the Example, just type in Your First Name and Last Name and click Submit. Click Here for the Example and Right Click For the Source

Copyright ®2008 - SherifAbdou – The Design Blog
3 Responses to RemoteObject Class in Flex and ColdFusion Example
john h
September 22nd, 2008 at 4:11 pm
thank you for the example.
when using the cfc to query a database, what should the return type be? query? array?
do you have an example to view?
tia,
jh
Sherif
September 22nd, 2008 at 4:26 pm
I’ll do an Example by tonight, Stay Tuned :biggrin:
Sherif
September 22nd, 2008 at 10:54 pm
I got a bit busy but what you do is returntype=”query”, post on http://vadexFx.com and i’ll help you out. I should have one by tomorrow