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...