MACROMEDIA COLDFUSION MX 61-CFML Quick Reference

Hide thumbs Also See for COLDFUSION MX 61-CFML:

Advertisement

Quick Links

CFML Quick Reference

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA COLDFUSION MX 61-CFML

  • Page 1 CFML Quick Reference...
  • Page 2 Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your 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 sites.
  • Page 3: Table Of Contents

    CONTENTS CFML tags ........5 CFML functions .
  • Page 4 Standard CGI variables ......33 Request ........33 Server .
  • Page 5: Cfml Tags

    CFML tags cfabort <cfabort showError = "error_message"> cfapplet <cfapplet appletSource = "applet_name" name = "form_variable_name" height = "height_in_pixels" width = "width_in_pixels" vSpace = "space_above_and_below_in_pixels" hSpace = "space_on_each_side_in_pixels" align = "alignment_option" notSupported = "message_to_display_for_nonJava_browser" param_1 = "applet_parameter_name" param_2 = "applet_parameter_name" param_n = "applet_parameter_name"> cfapplication <cfapplication name = "application_name"...
  • Page 6 dataBackgroundColor = "Hex value or Web color" showBorder = "yes" or "no" font = "font name" fontSize = "integer font size" fontBold = "yes" or "no" fontItalic = "yes" or "no" labelFormat = "number, currency, percent, date" xAxisTitle = "title text" yAxisTitle = "title text"...
  • Page 7 cfcookie <cfcookie name = "cookie_name" value = "text" expires = "period" secure = "Yes" or "No" path = "url" domain = ".domain"> cfdefaultcase <cfdefaultcase> cfdirectory <cfdirectory action = "directory action" directory = "directory name" name = "query name" filter = "list filter" mode = "permission"...
  • Page 8 <cffile action = "move" source = "full_path_name" destination = "full_path_name" mode = "mode" attributes = "file_attributes_list" charset = "charset_option"> <cffile action = "read" file = "full_path_name" variable = "var_name" charset = "charset_option" > <cffile action = "readBinary" file = "full_path_name" variable = "var_name">...
  • Page 9 directory = "directory name" localFile = "filename" remoteFile = "filename" item = "directory or file" existing = "file or directory name" new = "file or directory name" proxyServer = "proxy server" passive = "Yes" or "No"> cfftp action = "listDir" <cfftp action = "listDir"...
  • Page 10 cfgridcolumn <cfgridcolumn name = "column_name" header = "header" width = "column_width" font = "column_font" fontSize = "size" italic = "Yes" or "No" bold = "Yes" or "No" textColor = "web color" or "expression" bgColor = "web color" or "expression" href = "URL" hrefKey = "column_name"...
  • Page 11 delimiter = "character" textQualifier = "character"> cfhttpparam <cfhttpparam type = "transaction type" name = "data name" value = "data value" file = "filename" encoded = "Yes or No" mimeType = "MIME type designator"> cfif <cfif expression> HTML and CFML tags <cfelseif expression>...
  • Page 12 <!--- Syntax 2 - this syntax can invoke a method of a component only from within the component. ---> <cfinvoke method = "method name" returnVariable = "variable name" argumentCollection = "argument collection" ...> <!--- Syntax 3 - this syntax invokes a web service. ---> <cfinvoke webservice = "URLtoWSDL_location"...
  • Page 13 modifyType = "replace" or "add" or "delete" rebind = "Yes" or "No" referral = "number_of_allowed_hops" secure = "multi_field_security_string" separator = "separator_character" delimiter = "delimiter_character"> cflocation <cflocation url = "url" addToken = "Yes" or "No"> cflock <cflock timeout = "timeout in seconds " scope = "Application"...
  • Page 14 username = "user name" password = "password" wraptext = "column number" charset = "character encoding" type = "msg_type" mimeattach = "path" query = "query_name" group = "query_column" groupcasesensitive = "yes" or "no" startrow = "query_row" maxrows = "max_msgs" server = "serverspecs" port = "port_id"...
  • Page 15 cfobjectcache <cfobjectcache action = "clear"> cfoutput <cfoutput query = "query_name" group = "query_column" groupCaseSensitive = "Yes" or "No" startRow = "start_row" maxRows = "max_rows_output"> </cfoutput> cfparam <cfparam name = "param_name" type = "data_type" default = "value"> cfpop <cfpop server = "servername" port = "port_number"...
  • Page 16 debug > SQL statement(s) </cfquery> cfqueryparam <cfquery name = "query_name" dataSource = "ds_name" ...other attributes... SQL STATEMENT column_name = <cfqueryparam value = "parameter value" CFSQLType = "parameter type" maxLength = "maximum parameter length" scale = "number of decimal places" null = "Yes" or "No" list = "Yes"...
  • Page 17 interval = "seconds" requestTimeOut = "seconds" username = "username" password = "password" proxyServer = "hostname" proxyPort = "port_number"> proxyUser = "username" proxyPassword = "password" resolveURL = "Yes" or "No" <cfschedule action = "delete" task = "TaskName"> <cfschedule action = "run" task = "TaskName">...
  • Page 18 font = "font_name" fontSize = "integer" italic = "Yes" or "No" bold = "Yes" or "No" notSupported = "text"> cfstoredproc <cfstoredproc procedure = "procedure name" dataSource = "ds_name" username = "username" password = "password" blockFactor = "blocksize" debug = "Yes" or "No" returnCode = "Yes"...
  • Page 19 cftransaction <cftransaction action = "begin" or "commit" or "rollback" isolation = "read_uncommitted" or "read_committed" or "repeatable_read" > </cftransaction> cftree <cftree name = "name" required = "Yes" or "No" delimiter = "delimiter" completePath = "Yes" or "No" appendKey = "Yes" or "No" highlightHref = "Yes"...
  • Page 20: Cfml Functions

    CFML functions Array functions ArrayAppend(array, value) ArrayAvg array ArrayClear array ArrayDeleteAt(array, position) ArrayInsertAt(array, position, value) ArrayIsEmpty(array) ArrayLen(array) ArrayMax(array) ArrayMin(array) ArrayNew(dimension) ArrayPrepend(array, value) ArrayResize(array, minimum_size) ArraySet(array, start_pos, end_pos, value) ArraySort(array, sort_type [, sort_order ]) ArraySum(array) ArraySwap(array, position1, position2) ArrayToList(array [, delimiter ]) IsArray(value [, number ]) ListToArray(list [, delimiters ]) Authentication functions...
  • Page 21: Decision Functions

    DayOfWeekAsString(fu) DayOfYear("date") DaysInMonth("date") DaysInYear("date") FirstDayOfMonth(date) GetHttpTimeString(date_time_object) GetTickCount() GetTimeZoneInfo() Hour(date) IsDate(string) IsLeapYear(year) IsNumericDate(number) LSDateFormat(date [, mask ]) LSIsDate(string) LSParseDateTime(date/time-string) LSTimeFormat(time [, mask ]) Minute(date) Month(date) MonthAsString(month_number) Now() ParseDateTime(date/time-string [, pop-conversion ] ) Quarter(date) Second(date) TimeFormat(time [, mask ]) Week(date) Year(date) Decision functions DirectoryExists(absolute_path) FileExists(absolute_path) IIf(condition, string_expression1,string_expression2)
  • Page 22: Display And Formatting Functions

    StructKeyExists(structure, "key") YesNoFormat(value) Display and formatting functions Cjustify(string, length) DateFormat("date" [, "mask" ]) DecimalFormat(number) DollarFormat(number) FormatBaseN(number, radix) GetLocale() HTMLCodeFormat(string [, version ]) HTMLEditFormat(string [, version ]) LJustify(string, length) LSCurrencyFormat(number [, type ]) LSDateFormat(date [, mask ]) LSEuroCurrencyFormat(currency-number [, type ]) LSIsCurrency(string) LSIsDate(string) LSNumberFormat(number [, mask ])
  • Page 23: Full-Text Search Functions

    Full-text search functions ColdFusion MX 6.1: These functions are deprecated. They might not work, and might cause errors, in a future release. GetK2ServerDocCount() GetK2ServerDocCountLimit() IsK2ServerABroker() IsK2ServerDocCountExceeded() IsK2ServerOnline() International functions DateConvert("conversion-type", "date") GetEncoding(scope_name) GetHttpTimeString(date_time_object) GetLocale() GetTimeZoneInfo() LSIsCurrency(string) LSCurrencyFormat(number [, type ]) LSDateFormat(date [, mask ]) LSEuroCurrencyFormat(currency-number [, type ]) LSIsDate(string)
  • Page 24: Mathematical Functions

    ListLast(list [, delimiters ]) ListLen(list [, delimiters ]) ListPrepend(list, value [, delimiters ]) ListQualify(list, qualifier [, delimiters ] [, elements ]) ListRest(list [, delimiters ]) ListSetAt(list, position, value [, delimiters ]) ListSort(list, sort_type [, sort_order] [, delimiters ]) ListToArray(list [, delimiters ]) ListValueCount(list, value [, delimiters ]) ListValueCountNoCase(list, value [, delimiters ]) ReplaceList(string, list1, list2)
  • Page 25: Query Functions

    GetBaseTagData(tagname [, instancenumber ] ) GetBaseTagList() GetBaseTemplatePath() GetClientVariablesList() GetTickCount() Hash(string) PreserveSingleQuotes(variable) QuotedValueList(query.column [, delimiter ]) StripCR(string) ToBase64(string or binary_object [, encoding ]) ToBinary(string_in_Base64 or binary_value) ToString(any_value [, encoding ]) URLDecode(urlEncodedString [, charset ]) URLEncodedFormat(string [, charset ]) URLSessionFormat(request_URL) ValueList(query.column [, delimiter ]) WriteOutput string Query functions...
  • Page 26: Structure Functions

    LJustify(string, length) ListValueCount(list, value [, delimiters ]) ListValueCountNoCase list value delimiters LSIsCurrency(string) LSIsDate(string) LSIsNumeric(string) LSParseCurrency(string) LSParseDateTime(date/time-string) LSParseEuroCurrency(currency-string) LSParseNumber(string) LTrim(string) Mid(string, start, count) MonthAsString(month_number) ParagraphFormat(string) ParseDateTime(date/time-string [, pop-conversion ] ) REFind(reg_expression, string [, start ] [, returnsubexpressions ] ) REFindNoCase(reg_expression, string [, start] [, returnsubexpressions] ) RemoveChars(string, start, count) RepeatString(string, count)
  • Page 27: System Functions

    StructInsert(structure, key, value [, allowoverwrite ]) StructIsEmpty(structure) StructKeyArray(structure) StructKeyExists(structure, "key") StructKeyList(structure [, delimiter]) StructNew() StructSort(base, sortType, sortOrder, pathToSubElement) StructUpdate(structure, key, value) System functions DirectoryExists(absolute_path) ExpandPath(relative_path) FileExists(absolute_path) GetBaseTemplatePath() GetCurrentTemplatePath() GetDirectoryFromPath(path) GetEncoding(scope_name) GetException(object) GetFileFromPath(path) GetFunctionList() GetHttpRequestData() GetLocale() GetMetaData(object) GetMetaData this if used in a ColdFusion component GetMetricData(mode) GetProfileSections(iniFile) GetProfileString(iniPath, section, entry)
  • Page 28: Coldfusion Variables

    ColdFusion variables ColdFusion MX returns variables, such as those returned in a cfdirectory or cfftp operation. A variable is usually referenced by scoping it according to its type: naming it according to the code context in which it is available; for example, Session.varname, or Application.varname.
  • Page 29: Custom Tag Variables

    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>#Caller.variable_name#...
  • Page 30: Coldfusion Query Variables

    queryname.CurrentRow queryname.RecordCount queryname.ColumnList CFCATCH variables Within a cfcatch block, the active exception properties can be accessed as the following variables: CFCATCH.Type CFCATCH.Message CFCATCH.Detail CFCATCH.ErrNumber CFCATCH.NativeErrorCode CFCATCH.SQLState CFCATCH.LockName CFCATCH.LockOperation CFCATCH.MissingFileName CFCATCH.TagContext CFCATCH.ErrorCode CFCATCH.ExtendedInfo CFDIRECTORY variables The cfdirectory tag, with action=list, returns a query object as follows, where queryname is the name attribute value: queryname.Name...
  • Page 31: Cffile Action=Upload Variables

    Note: You can substitute the prefix CFERROR for Error, if type = "Exception" or "Monitor"; for example, CFERROR.Diagnostics, CFERROR.Mailto or CFERROR.DateTime. CFFILE ACTION=Upload variables File variables are read-only. Use the CFFILE prefix to reference file variables; for example, CFFILE.ClientDirectory. The File prefix is deprecated in favor of the CFFILE prefix.
  • Page 32: Cfhttp Variables

    CFHTTP variables A cfhttp get operation can return text and binary files. Files are downloaded and the contents stored in a variable or file, depending on the MIME type, as follows: CFHTTP.FileContent CFHTTP.MimeType CFHTTP.Header CFHTTP.ResponseHeader[http_hd_key] CFHTTP.StatusCode CFLDAP variables The cfldap action=query tag returns information about the LDAP query, as follows: queryname.CurrentRow queryname.RecordCount...
  • Page 33: Standard Cgi Variables

    searchname.Title searchname.Score searchname.Custom1 and Custom2 searchname.Summary searchname.RecordCount searchname.CurrentRow searchname.RecordsSearched searchname.ColumnList Standard CGI variables This section lists the CGI 1.1 variables that some web servers create when a CGI script is called. The CGI variables that are available for your use vary with the web server and configuration.
  • Page 34 CFML Quick Reference...

This manual is also suitable for:

Coldfusion mx

Table of Contents