
678
DEVELOPING
COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Las
t
upda
te
d 8/5/2010
Specifying the ColdFusion Data Service adapter
Flex provides adapters to connect to various back-end applications. To use the ColdFusion Data Service adapter, you
specify it in the data management configuration file by copying the following adapter-definition to the adapters section
of the data-management-config.xml file that is in the WEB-INF/flex folder of the server on which you want to run the
Flex application. If you are running LiveCycle Data Services ES in ColdFusion, the data-management-config.xml file
contains the adapter definitions by default.
The adapter definition includes the following line:
<adapter-definition id="coldfusion-dao" class="coldfusion.flex.CFDataServicesAdapter"/>
Specifying a destination
A destination is the server-side service or object that you call. You configure Data Management destinations in the
data-management-config.xml file.
The destination contains the following elements:
Element
Description
access
Define the resolution rules and access level of the CFC being invoked
use-accessors
Whether the Value Object CFC has getters and setters. Set the value of
use-
accessors
to
true
if there are getters and setters in the Value Object CFC. However,
if you set
use-accessors
to
true
and there are no getters and setters in the value
object CFC, ColdFusion sets the value of any property of the value object CFC in the
this
scope. If your CFC does not have any getters and setters, you can increase
performance by setting this to
false
so that ColdFusion does not spend time looking
for these methods. The default value is
true
.
use-structs
Whether to translate ActionScript to CFCs. Set the value of
use-structs
to
true
if
you don't require any translation of ActionScript to CFCs. The assembler can still return
structures to Flex, even if the value is
false
. The default value is
false
.
force-cfc-lowercase
force-query-lowercase
force-struct-lowercase
Whether to make property names, query column names, and structure keys lowercase
when converting to ActionScript. Query column names must precisely match the case
of the corresponding ActionScript variables. The default value is
false
.
use-mappings
A Boolean value specifying whether the source attribute can be relative to (start with)
a ColdFusion mapping. The default value is true.
method-access-level
Specifies the
access
attribute values a CFC must have for ColdFusion to respond to
the request. The following values are valid:
•
remote
Flex can access only functions that specify remote access. (the default)
•
public
Flex can access functions that specify both remote or public access.
Element
Description
destination id
The ID must be unique for each destination.
adapter
-ref
The name of the adapter to use. You use the ColdFusion
adapter-ref
element for any ColdFusion
specific destinations.
channels
-ref
Use the ColdFusion configured channels that have the instantiate-types flag set to
false
.
component
The name or path on the ColdFusion server.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...