• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Flash Remoting and ColdFusion MX > 5.7. Updating Data on the Server

Updating Data on the Server

One frequent question about Flash Remoting is, “How do I get the recordset back to the server?” The short answer is that you have to program your Flash movie to manually parse the data and send it to the server. For example, when using the DataGrid component, changes made to the data are not uploaded to the server automatically. In the next few sections, however, I’ll show you a few techniques that can be used to ease the passing of data back to the server.

Passing a Record to the Service Manually

In Chapter 3, you saw a Products display using text fields in Examples Example 3-3 through Example 3-8. The examples added several new properties and methods to the RecordSet class. We’ll expand on that example to show the updating, inserting, and deleting of data. I’ll go through the server-side code first. The component is called ProductsAdmin.cfc and should be saved in the webroot \com\oreilly\frdg\admin folder. As you recall from the previous ColdFusion security discussion, this directory is protected by an Application.cfm file. Therefore, to access the remote methods in this directory, your Flash code must log into the application. For the purposes of the example, the authentication code is hardcoded into the Flash file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint