Sunday 29 Jan 2012   
Add Comment

Flex blackbox forms

Flex / ColdFusion Tutorial #10

If you’ve ever wanted to refresh a tired web interface by replacing your traditional HTML forms with a more user friendly interface, you may have encountered some of the thoughts which are addressed here. I’ll describe a method to utilize the power of Flex components in conjunction with some simple ColdFusion tags to make this process as simple as possible. You’ll end up with (hopefully) a better user inteface; and be able to centralize multiple forms into a refreshless (page that is) interface.

Note this uses US zip codes so for a workign example try a US zip code or use a well known one: 90210

BlackBox.mxml

The simplicity of this example is that fact that I’m using Flash Remoting via the RemoteObject mxml tag.

In the example, I wanted to make my case as simply as possible. To this end I chose a web based form that provided some simple feedback for valid posts, and an easy way to determine if it wasn’t.



blackbox.cfc

The magic all happens inside the ColdFusion function with the call that populates the 'real' form with the data you send from Flex and posts your submission. All you have to do now is look at the response and what it means for success or failure, which you then return to Flex to do with as you please.



Demo

See this code running!


Download

Download this code as a zip!


Comments

There are no comments!

Click button to add a comment


Author

Darin Kohles


Published

Saturday 10 Jan 2009

Tags

cfargument  cfcatch  cfcomponent  cfelse  cffunction  cfhttp  cfhttpparam  cfif  cfoutput  cfrethrow  cfreturn  cfset  cftry  mx:Application  mx:Button  mx:Form  mx:FormHeading  mx:FormItem  mx:Image  mx:Label  mx:method  mx:RemoteObject  mx:Script  mx:Spacer  mx:Style  mx:Text  mx:TextInput  mx:ZipCodeValidator