RemoteObject Class in Flex and ColdFusion Example

21 Sep
2008
Delicious

remoteflex RemoteObject Class in Flex and ColdFusion Example
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

Incoming Search Terms :flex remoteobject example , the messageagents destination must be set to send messages , flex 4 remoteobject coldfusion , [rpc fault faultstring=[messagingerror message=the messageagents destination must be set to send messages ] faultcode=invokefailed faultdetail=couldnt establish a connection to ] , flex remote object coldfusion , create own remote object flex coldfusion , flex remoteobject in class , flex 4 remote object class , messagingerror message=the messageagents destination must be set to send messages , remoteobject class flex Incoming Search Terms :flex remoteobject example , the messageagents destination must be set to send messages , flex 4 remoteobject coldfusion , [rpc fault faultstring=[messagingerror message=the messageagents destination must be set to send messages ] faultcode=invokefailed faultdetail=couldnt establish a connection to ] , flex remote object coldfusion , create own remote object flex coldfusion , flex remoteobject in class , flex 4 remote object class , messagingerror message=\the messageagent\s destination must be set to send messages , remoteobject class flex

Share this story with a friend !
Join SherifAbdou's Rss Feed Stumble This Article! Add this to your Delicious Bookmarks! Digg this story ! Add this story to Reddit ! Tweet This Brush


3 Responses to RemoteObject Class in Flex and ColdFusion Example

Avatar

john hNo Gravatar

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

Avatar

SherifNo Gravatar

September 22nd, 2008 at 4:26 pm

I’ll do an Example by tonight, Stay Tuned :biggrin:

Avatar

SherifNo Gravatar

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

Comment Form