About scopes
73
URL
Contains parameters passed to the current page in the URL that is used to call it.
The parameters are appended to the URL in the format ?variablename =
value[&variablename=value...]; for example www.MyCompany.com/
inputpage.cfm?productCode=A12CD1510&
quantity=3.
Note
:
If a URL includes multiple parameters with the same name, the resulting
variable in the ColdFusion URL scope consists of all parameter values separated by
commas. For example, a URL of the form http://localhost/urlparamtest.cfm?
param=1¶m=2¶m=3 results in a URL.param variable value of 1,2,3 on the
ColdFusion page.
Attributes
Used only in custom tag pages. Contains the values passed by the calling page in
the custom tag’s attributes. For more information, see
Chapter 9, “Creating and
Using Custom CFML Tags,” on page 173
.
Caller
Used only in custom tag pages. The custom tag’s Caller scope is a reference to the
calling page’s Variables scope. Any variables that you create or change in the
custom tag page using the Caller scope are visible in the calling page’s Variables
scope. For more information, see
Chapter 9, “Creating and Using Custom CFML
Tags,” on page 173
.
ThisTag
Used only in custom tag pages. The ThisTag scope is active for the current
invocation of the tag. If a custom tag contains a nested tag, any ThisTag scope
values you set before calling the nested tag are preserved when the nested tag
returns to the calling tag.
The ThisTag scope includes three built-in variables that identify the tag’s execution
mode, contain the tag’s generated contents, and indicate whether the tag has an
end tag.
A nested custom tag can use the
cfassociate
tag to return values to the calling tag’s
ThisTag scope. For more information, see
“Accessing tag instance data”
on page 182
.
Request
Used to hold data that must be available for the duration of one HTTP request. The
Request scope is available to all pages, including custom tags and nested custom
tags, that are processed in response to the request.
This scope is useful for nested (child/parent) tags. This scope can often be used in
place of the Application scope, to avoid the need for locking variables. Several
chapters discuss using the Request scope.
CGI
Contains environment variables identifying the context in which a page was
requested. The variables available depend on the browser and server software. For
a list of the commonly used CGI variables, see
Chapter 1, “Reserved Words and
Variables,” in CFML Reference
.
Cookie
Contains variables maintained in a user’s browser as cookies. Cookies are typically
stored in a file on the browser, so they are available across browser sessions and
applications. You can create memory-only Cookie variables, which are not available
after the user closes the browser. Cookie scope variable names can include periods.
Client
Contains variables that are associated with one client. Client variables let you
maintain state as a user moves from page to page in an application, and are available
across browser sessions. By default, Client variables are stored in the system
registry, but you can store them in a cookie or a database. Client variables cannot be
complex data types and can include periods in their names. For more information,
see
Chapter 15, “Using Persistent Data and Locking,” on page 315
.
Scope Description
Содержание ColdFusion MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...