Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 30

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
The CFML Programming Language
mailObj.addparam(file="#ExpandPath('test.txt')#");
mailObj.addPart(name="foo",type="html",charset="utf-8",
body="This is a test message.");
You can also clear child tag settings by calling the following functions.
httpObj.clearParams
mailObj.clearParams
mailObj.clearParts
pdfObj.clearParams
queryObj.clearParams
storedProcObj.clearParams
storedProcObj.clearProcResults
If you used multiple add methods on an object, the clear method clears all values set in all the methods.
Step 3: Executing service actions
Service tags, excluding cfmail and cfpdf, have one or more actions that return results. Some, including the cfpdf and
cfftp tags have action attributes. For these tags, each action corresponds to a method on the service object. For example,
the ftp object action methods include
service tags return data has changed. Now, a component is returned with applicable properties set and you need to
invoke getters on the properties to access the data.
Note: The PDF object has two action methods whose names differ from the corresponding cfftp action attribute values:
and
getPDFInfo
setPDFInfo
with the set and get methods for the PDF info attribute.
The
,
,
cfhttp
cfmail
cfquery
single action. To perform these actions in
httpObj.send()
mailObj.send()
queryObj.execute()
storedProcObj.execute()
To get an action result, you typically assign the results of the action method to a variable, as in the following example:
Q = qry.execute(sql="select * from art");
Note: The attributes that specify you for an action are valid only for that action and are cleared once the action is
completed.
Service code example: mail, ftp, and http
The following example shows the use of the mail, http, and ftp services in
,
,
open
close
listDir
instead of
and
getInfo
setInfo
, and
tags do not have action attributes. Instead, the tags perform a
cfstoredproc
, call the following functions:
cfscript
Last updated 1/20/2012
,
,
, and many others. However, the way
getFile
rename
. This difference is required to prevent name collisions
.
cfscript
25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents