Adobe COLDFUSION 9 Manual page 656

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Logging SQL statements
The ActionScript ORM logs all SQL statements that it executes.
The log can be configured as follows:
Add a log target for the AIR applications as shown in the following example:
var logTarget:TraceTarget = new TraceTarget();
logTarget.filters = "*";
logTarget.level = LogEventLevel.ALL;
Log.addTarget(logTarget);
The log target is the TraceTarget where all the trace statements appear. The log target can be set to any other log using
the Flash APIs.
ColdFusion ActionScript APIs
The following two APIs have been introduced to the session class in the
keepAllClientObjects
Description
Takes an
ArrayCollection
ArrayCollection.
Returns
An instance of
coldfusion.air.SessionToken
Syntax
public function keepAllClientObjects(conflicts:ArrayCollection):SessionToken
Parameters
Parameter
mx.collections.ArrayCollection
Example
private function conflictHandler(event:ConflictEvent):void
{
// Alert.show("Server returned a Conflict !");
var conflicts:ArrayCollection = event.result as ArrayCollection;
// Ignore Server data and retain client Data in
var token:SessionToken = session.keepAllClientObjects(conflicts);
token.addResponder(new mx.rpc.Responder(conflictSuccess, conflictFault));
}
keepClientObject
Description
Ensures that the client object is retained instead of the one from the server (despite server raising data conflict).
The API also ensures that the retained client object is not sent to the server as a new operation on sync.
of conflict instances and keeps the client object for every conflict instance in the
(which is the token for
Description
An
ArrayCollection
Last updated 8/5/2010
package:
coldfusion.air
keepAllClientObjects
of conflicts raised by the server.
SQLite DB
651
call).

Advertisement

Table of Contents
loading

Table of Contents