|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
TOP COLDFUSION LINKS Feature Your First Adobe Flex Application with a ColdFusion Backend
The wow factor plus usability
Jul. 19, 2007 01:30 PM
Receiving Responses from the Server <mx:method name="getAll" result="tasksReceived(event)" /> You already implemented the tasksReceived() function but left taskSaved() incomplete. This function will be called either because a new task was added or because a task was set as done. In each case, you should do something different. You could also implement two different methods in the service if you'd like to separate them. If a new task was created, you want to add it to the main list of tasks, that is, to the "tasks" ArrayCollection that feeds the Repeater. If the task was updated (set as done), you want to remove it from the list. private function taskSaved(event:ResultEvent):void { Making Changes to the Generated ColdFusion Components <cfset var local0 = createUUID() /> That should be added to the "create" method. Then your TaskGateway component should return the task it got in the "save" method: <cffunction name="save" output="false" access="remote"> While you're at it, you may also want to change the getAll method so that it returns only the undone items, or you may want to delete the task when it's set as done. Final Touches As you can see, integrating Flex with ColdFusion is very simple and the CFC wizards greatly simplify the task. In addition, with the new Flex/ColdFusion connectivity features, you can send object instances from Flex to ColdFusion and from ColdFusion to Flex as if they were instantiated locally like you did with the Task.cfc-Task.as class mapping. We hope this sample application gets you started using Flex and ColdFusion together to offer your users a nicer experience. We've only scratched the surface with this article; you can do much more with Flex. As your next steps, you can look at the sample code, read the tutorials at Adobe, and get your feet wet with an application of your own.
YOUR FEEDBACK
CFDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||