23.08.2013 Views

ColdFusion Developer's Guide - Electromanuals.org

ColdFusion Developer's Guide - Electromanuals.org

ColdFusion Developer's Guide - Electromanuals.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Ofrecido por www.electromanuales.com<br />

ADOBE COLDFUSION 8<br />

<strong>ColdFusion</strong> Developer’s <strong>Guide</strong><br />

Managing fills<br />

To determine whether to refresh a fill result after an item is created or updated, you include a fillContains method<br />

in the assembler and set both use-fill-contains and auto-refresh to true in the fill-method section of the<br />

data-management-config.xml file. The following examples shows a fill-method section:<br />

<br />

true<br />

true<br />

false<br />

<br />

In this example, ordered is set to false because the fill result is not sorted by any criteria. However, if the fill result<br />

is sorted, you set ordered to true. When an item changes in a fill result that is ordered, you must refresh the entire<br />

fill result.<br />

The fillContains method tells the Flex application whether it is necessary to run the fill again after an item in the<br />

fill result has changed. The fillCcontains method returns a value that indicates how the fill should be treated for<br />

that change. When the fillContains method returns true, the fill is executed after a create or update operation.<br />

The following example shows the fillContains method signature:<br />

<br />

<br />

<br />

<br />

The fillContains method has the following arguments:<br />

• fillArgs is a list of arguments to pass to the fill method.<br />

• item is the record to check to determine if it is in the result set.<br />

• isCreate indicates whether the record is new.<br />

A sample fillContains method, which determines whether the fill arguments (part of the first or last name) are<br />

in the Contact item passed to the function, is as follows:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

700

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!