background image

CFML Quick Reference

33

Caller scope

ColdFusion MX supports the Caller scope as a structure.

Client variables

The following client variables are reserved:

Client.CFID
Client.CFToken
Client.HitCount
Client.LastVisit
Client.TimeCreated
Client.URLToken

Server variables

Use the Server prefix to reference server variables, as 
follows:

Server.ColdFusion.ProductName
Server.ColdFusion.ProductVersion
Server.ColdFusion.ProductLevel 
Server.ColdFusion.SerialNumber 
Server.ColdFusion.SupportedLocales
Server.ColdFusion.AppServer
Server.ColdFusion.Expiration
Server.ColdFusion.RootDir
Server.OS.Name 
Server.OS.AdditionalInformation 
Server.OS.Version 
Server.OS.BuildNumber

Application and session variables

To enable application and session variables, use the 

cfapplication

 tag or Application.cfc. Reference them as 

follows:

Application.

myvariable

Session.

myvariable

To ensure that modifications to shared data occur in the 
intended sequence, use the 

cflock

 tag.

The predefined application and session variables are as 
follows:

Application.ApplicationName
Session.CFID
Session.CFToken
Session.URLToken

Custom tag variables

A ColdFusion custom tag returns the following variables:

ThisTag

.ExecutionMode

ThisTag

.HasEndTag

ThisTag

.GeneratedContent

ThisTag

.AssocAttribs[

index

]

A custom tag can set a Caller variable to provide information 
to the caller. The Caller variable is set as follows:

<cfset Caller.

variable_name

 = "value">

The calling page can access the variable with the 

cfoutput

 

tag, as follows:

<cfoutput>#

variable_name

#</cfoutput>

Request variable

Request variables store data about the processing of one 
page request. Request variables store data in a structure that 
can be passed to nested tags, such as custom tags, and 
processed once.

To provide information to nested tags, set a Request 
variable, as follows:

<CFSET Request.

field_name1

 = "value">

<CFSET Request.

field_name2

 = "value">

Содержание COLFUSION MX 7-CFML

Страница 1: ...COLDFUSION MX7 CFML Quick Reference...

Страница 2: ...own risk Macromedia provides these links only as a convenience and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third party...

Страница 3: ...Gateway interface 32 Methods to implement 32 IM Gateway CFC incoming message methods 32 IM Gateway message sending commands 32 Application cfc 32 Methods to implement 32 ColdFusion variables 32 Varia...

Страница 4: ...Y and CFSTOREDPROC variables 37 CFREGISTRY variables 37 CFSEARCH variables 37 Standard CGI variables 37 Request 37 Server 37 Client 38 CGI environment variables 38 CGI server variables 38 CGI client v...

Страница 5: ...ys hours minutes seconds setDomainCookies yes or no scriptProtect none all or list cfargument cfargument name string type data type required yes or no default default value displayname descriptive nam...

Страница 6: ...ame String pieSliceStyle solid sliced scaleFrom integer minimum value scaleTo integer maximum value seriesPlacement default cluster stacked percent show3D yes or no showBorder yes or no showLegend yes...

Страница 7: ...me reset yes or no cfcookie cfcookie name cookie_name value text expires period secure yes or no path url domain domain cfdefaultcase cfdefaultcase cfdirectory cfdirectory action directory action dire...

Страница 8: ...r levels cfelse cfif expression HTML and CFML tags cfelseif expression HTML and CFML tags cfelse HTML and CFML tags cfif cfelseif cfif expression HTML and CFML tags cfelseif expression HTML and CFML t...

Страница 9: ...me nameConflict behavior accept mime_type file_type mode permission attributes file_attribute_or_list result result_name cffile action write file full_path_name output content mode permission addNewLi...

Страница 10: ...vrule or spacer style style specification width pixels height pixels visible Yes or No OR cfformitem type html or text style style specification width pixels height pixels visible Yes or No enabled Y...

Страница 11: ...me colHeaderFontSize size colHeaderItalic yes or no colHeaderBold yes or no colHeaderTextColor web color bgColor web color maxRows number The following attributes work in Flash format only style style...

Страница 12: ...ues Comma separated strings and or numeric range valuesDisplay Comma separated strings and or numeric range valuesDelimiter delimiter character cfgridrow cfgridrow data col1 col2 cfgridupdate cfgridup...

Страница 13: ...cfindex cfindex collection collection_name action action type type title title key ID body body custom1 custom_value custom2 custom_value custom3 custom_value custom4 custom_value category category_na...

Страница 14: ...in the component cfinvoke method method name returnVariable variable name argumentCollection argument collection OR Syntax 3 This syntax invokes a web service cfinvoke webservice URLtoWSDL_location me...

Страница 15: ...ue omit yes or no cfldap cfldap server server_name port port_number username name password password action action name name timeout seconds maxRows number start distinguished_name scope scope attribut...

Страница 16: ...Row row_num endRow row_num cfloop cfloop looping over a list or file cfloop index index_name list list_items delimiters item_delimiter cfloop cfloop looping over a COM collection or structure cfloop c...

Страница 17: ...plate path name tag_name attributeCollection collection_structure attribute_name1 valuea attribute_name2 valueb cfNTauthenticate cfNTauthenticate username username password password domain nt_domain r...

Страница 18: ...Path path timeout seconds maxRows number startRow number generateUniqueFilenames yes or no debug yes or no cfprocessingdirective cfprocessingdirective pageencoding page encoding literal string OR cfpr...

Страница 19: ...istry action getAll cfregistry action getAll branch branch type data type name query name sort criteria cfregistry action get cfregistry action get branch branch entry value variable variable type dat...

Страница 20: ...artTime time url URL port port_number publish yes or no endDate date endTime time interval seconds requestTimeOut seconds username username password password proxyServer hostname proxyPort port_number...

Страница 21: ...sh only width number of pixels Flash only Zero or more HTML option tags cfselect cfset cfset var variable_name expression cfsetting cfsetting enableCFoutputOnly yes or no showDebugOutput yes or no req...

Страница 22: ...ribute value value text onKeyUp JavaScript or ActionScript onKeyDown JavaScript or ActionScript onMouseUp JavaScript or ActionScript onMouseDown JavaScript or ActionScript onChange JavaScript or Actio...

Страница 23: ...roll yes or no style style specification enabled Yes or No visible Yes or No tooltip tip text onChange ActionScript notSupported text cftree cftreeitem cftreeitem value text display text parent parent...

Страница 24: ...encoding CharsetEncode binaryobject encoding Hash string algorithm encoding LCase string ListToArray list delimiters ToBase64 string or binary_object encoding ToBinary string_in_Base64 or binary_value...

Страница 25: ...date TimeFormat time mask Week date Year date Decision functions DirectoryExists absolute_path FileExists absolute_path IIf condition string_expression1 string_expression2 IsArray value number IsBina...

Страница 26: ...ng LSParseDateTime date time string LSParseEuroCurrency currency string LSParseNumber string LSTimeFormat time mask NumberFormat number mask ParagraphFormat string RJustify string length StripCR strin...

Страница 27: ...string2 Decrypt encrypted_string key algorithm encoding Encrypt string key algorithm encoding Find substring string start FindNoCase substring string start FindOneOf set string start FormatBaseN numb...

Страница 28: ...entValue number Exp number Fix number FormatBaseN number radix IncrementValue number InputBaseN string radix Int number Log number Log10 number Max number1 number2 Min number1 number2 Pi Rand algorith...

Страница 29: ...racters of the string Asc string BinaryDecode string binaryencoding BinaryEncode binarydata encoding CharsetDecode string encoding CharsetEncode binaryobject encoding Chr number CJustify string length...

Страница 30: ...uding string set SpanIncluding string set StripCR string ToBase64 string or binary_object encoding ToBinary string_in_Base64 or binary_value ToString value encoding Trim string UCase string URLDecode...

Страница 31: ...oding scope_name charset SetLocale new_locale SetProfileString iniPath section entry value WriteOutput string XML functions AddSOAPRequestHeader webservice namespace name value mustunderstand AddSOAPR...

Страница 32: ...onApplicationEnd onApplicationStart onError onRequest onRequestEnd onRequestStart onSessionEnd onSessionStart ColdFusion variables ColdFusion MX returns variables such as those returned in a cfdirect...

Страница 33: ...variable Session myvariable To ensure that modifications to shared data occur in the intended sequence use the cflock tag The predefined application and session variables are as follows Application Ap...

Страница 34: ...les A ColdFusion tag that returns a query object supports the following variables where queryname is the value of the name attribute queryname CurrentRow queryname RecordCount queryname ColumnList CFC...

Страница 35: ...ies to exception type can be accessed within the Error scope as follows Error Type Error Message Error Detail Error ErrNumber Error NativeErrorCode Error SQLState Error LockName Error LockOperation Er...

Страница 36: ...ame row queryname Path row queryname URL row queryname Length row queryname LastModified row queryname Attributes queryname IsDirectory queryname Mode CFHTTP variables A cfhttp get operation can retur...

Страница 37: ...FSEARCH variables A cfsearch operation returns the following variables where searchname is the name attribute value searchname URL searchname Key searchname Title searchname Score searchname Custom1 a...

Страница 38: ...e request anywhere in the page CGI variables are read only Note The environment variables available to applications depend on the browser and server software CGI server variables The server creates th...

Отзывы: