Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 701

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Method
getLength
getNumberAvailable
isFullyPopulated
isLocal
removeAll
removeItemAt
replaceItemAt
setDeliveryMode
setField
sort
sortItemsBy
These functions are available for every RecordSet object returned by the
run these functions as follows:
objectName.functionName();
For example, in the result function that you create to handle record set data returned by the
can reference the database column names returned in the record set using the
function selectData_Result ( result )
{
//result holds the query data; employeesView is a Flash list box
stringOutput.text = result.getColumnNames();
_root.employeesView.setDataProvider(result);
}
Building a simple application
The following procedure describes how to build a simple server-side ActionScript application. The example
application, a corporate personnel directory, uses the NetServices object to connect to the
server-side ActionScript. The
source and returns the results to the SWF file as a RecordSet object.
Note: The server-side ActionScript application that you create provides the back-end services in an application.
This example requires the following:
• A server-side ActionScript file named personneldirectory.asr that includes functions that interact with a
ColdFusion data source.
• A client-side SWF movie in which the NetServices object is created.
Create the application
Write server-side ActionScript that performs the database query and returns data to the client through the Flash
1
Remoting service.
2
Create the SWF movie interface. See
Description
Returns the total number of records in a RecordSet object
Returns the number of records that have been downloaded from the server
Determines whether a RecordSet object can be edited or manipulated
Determines whether a RecordSet object is local or server-associated
Removes all records from the RecordSet object
Removes a specified record
Replaces the entire contents of a record
Changes the delivery mode of a server-associated record set
Replaces one field of a record with a new value
Sorts all records by a specified compare function
Sorts all the records by a selected field
server-side ActionScript retrieves data from a ColdFusion data
personneldirectory
"Creating the SWF movie
Last updated 1/20/2012
function to the Flash client. You
CF.query
CF.query
getColumnNames
personneldirectory
interface" on page 697.
696
function, you
RecordSet function:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents