Selecting a methodology
When you create your ColdFusion CFCs, you can put the database manipulation
functionality directly in the methods in the assembler CFC and create a Value Object CFC,
which is a CFC that contains property definitions and related
However, to separate the lower level database functionality from the high level Flex assembler
operations, you can use the Bean/DAO methodology.
The Bean/DAO methodology requires that you put the
in the assembler CFC. Rather than performing database functions directly, such as retrieving
data, the methods in the assembler CFC call methods in the Data Access Object (DAO)
CFC, which perform the lower level database functions such as retrieving records. The DAO
CFC creates Value Objects, which are CFCs that contain the values. A Value Object is
essentially a row in the result set.
Managing fills
To determine whether to refresh a fill result after an item is created or updated, you include a
method in the assembler and set both use-fill-contains and auto-refresh to true
fillContains
in the
<fill-method
section appears as follows:
method>
<fill-method>
<use-fill-contains>true</use-fill-contains>
<auto-refresh>true</auto-refresh>
<ordered>false</ordered>
</fill-method>
In this example, ordered is set to false because the fill result is not sorted by any criteria.
However, if the fill result is sorted, you set ordered to true. When an item changes in a fill
result that is ordered, you must refresh the entire fill result.
The
method tells the Flex application whether it is necessary to run the fill
fillContains
again after an item in the fill result has changed. The
that indicates how the fill should be treated for that change. When the
method returns true, the fill is executed after a create or update operation.
The
method signature is as follows:
fillContains
<cffunction name="fillContains" output="no" returnType="boolean"
access="remote">
<cfargument name="fillArgs" type="array" required="yes">
<cfargument name="item" type="[CFC type object]" required="yes">
<cfargument name="isCreate" type="boolean" required="yes">
> section of the data-management-config.xml file. A sample
get
,
fill
get
fillCcontains
Application development and deployment process
and
methods.
set
,
, and
methods
sync
count
<fill-
method returns a value
fillContains
43
Need help?
Do you have a question about the COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 and is the answer not in the manual?