IFBIN Flex-ColdFusion example updated
When we submitted our Flex-ColdFusion example to IFBIN, Flex was in an early beta, which means that the example doesn't work with the final release.
All IFIBIN authors have their signature "Hello World" example. Because what it represents us is the integration of Flex and ColdFusion, we decided that our Hello World needed to have ColdFusion in the mix.
I just updated the example and I am posting it here for download. I will submit the update to IFBIN soon. As you will see, it is very simple, as "Hello Worlds" should be. It shows how to use the RemoteObject tag to communicate with ColdFusion, how to deal with the server response and how to make a simple state transition.
James
Now I see the power of Flex, but it still gets confusing when trying to access data to display in grids and forms and uploading data to be saved or updated. The built-in in wizards work but not knowing the real process makes it had to be creative with the design and power of Flex.
I know with the sample you created here, you help me so much more, but this business of creating objects to pass and process it get confusing. Can you create a quick CRUD app that shows the easiest and most straight forward way of connecting to a backend data source using ColdFusion.
Thanks in advanced for your input on this.
P.S. Are you going to Max2006?, if you are we hope to see you there and finally have a chance to meet a legend in this field.
Michael White
Mark
Thanks and hope to see everyone at MAX '06,
Mark
Chaz
Laura,
How can I create my on wrapper in cfm to show the flex app?
Can I do this, create a cfform app and embed some flex apps module also?
Thanks for all of your help
Laura
Thank you for your comments. For a basic example of add/update/delete you can take a look at My To-Do list (http://www.asfusion.com/projects/my-to-do-list/ ), although it is different than your regular form for CRUD.
Yes, we'll be at MAX, so see you there!
Michael,
We are planning to update the Real Estate example. We posted a version but it doesn't compile now with the final release. I am also planning to do a series on how to convert flash forms to Flex.
Chaz,
Yes, you can create your own wrapper (html or cfm), a page that basically has the swf object reference. But you can't embed Flex apps inside flash forms because they are different versions of flash. You could load the swf with an img tag (like we do to load the file upload functionality into flash forms), but I am not sure if that will work because they use different actionscript versions and virtual machines.
Boybles Maldooney
Laura
I didn't think on doing the Cairngorm version, but it would be a good idea. For this simple example, however, people will think it is an overkill :)
David Brannan
This worked well on localhost. When uploaded to my remote server it failed (same files). The server version was 7.01, so I ran the cummulative update to 7.02 yet it still failes:
Any idea what could be the cause?
=====================
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::statusHandler()
=====================
If I can get this function I can start building a new app with real data - cool!
Laura
That usually means Flex cannot find the gateway. Are you sure everything is properly installed? Can you tell what port and address is it trying to access?
David Brannan
Maury
Great example !
I was able to get this to work on my remote server.
But when I try to run the example from your website I get the following error. I have tried this example from other machines here and at home and it works fine.
I also receive it when running other Flex 2 / Flash Remoting examples, so I'm sure it's something wrong with this machine. Do you have any idea what could be causing this ?
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 200"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::statusHandler()
Thanks,
Maury
Al
I have been thinking about going the Flex route, since I've heard that there are a lot of things Flex Remoting can do that Flash can't. My BIG question is this...
I want to create a standalone program on the clients computer that they willingly install using Flex or Flash. This program connects to my servers flash gateway and accepts or denies login credentials (I've got that set up so far). I want to create an upload section that enables the user to select the file, and then this program passes it to the server and uploads the file, then parses through the data and inserts it into tables (I also have this setup on the server side, using flash forms.) My question is this....
Can you pre-populate the "File" field in either Flah or Flex? Or can the file be passed through the gateway for the server to process? The problem is that this LUA file is hidden deep within the users hard drive, and browsing to the file can be a huge pain sometimes.. other times the person using the program doesn't always know what they are looking for.
Any suggestions, or am Ijust out of luck?
Mike
My coworker and I have found your website to be an invaluable tool. We are CF programmers who have learned actionscript and flash remoting through your articles. In other words...thanks a million!
In one of your posts above, dated 10/26/06, you said "I am also planning to do a series on how to convert flash forms to Flex." Did you you ever write that series? If so, where can I find it? We have developed numerous flash form cf apps for our company. We have started learning flex, but we would love for there to be an easy way to convert our existing apps into flex. I know you can grab the generated mxml code by doing a cfdump on the form, but pasting that into flex doesn't work for us. I know there must be config settings that need to be established first. Any tips and tricks you can tell us?
thanks,
-Mike
Laura
Thanks!
No, I never wrote that guide, but my recommendation right now is to simply learn Flex. There isn't all that much magic that happens in Flash Forms that you would not understand when writing Flex. Unfortunately, no, copying and pasting will definitely not work, for several reasons.