MACROMEDIA COLFUSION MX 7-CFML Quick Reference

Hide thumbs Also See for COLFUSION MX 7-CFML:

Advertisement

Quick Links

COLDFUSION
MX 7
®
CFML Quick Reference

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA COLFUSION MX 7-CFML

  • Page 1 COLDFUSION MX 7 ® 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 CFPOP variables ....... 36 CFQUERY and CFSTOREDPROC variables ..37 CFREGISTRY variables .
  • 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 cfcase <cfcase value = "value or delimited set of values" delimiters = "delimiter characters"> cfcatch <cfcatch type = "exceptiontype"> Exception processing code here </cfcatch> cfchart Syntax 1 <!--- This syntax uses an XML file or string to specify the chart style. ---> <cfchart style = "XML string or filename">...
  • Page 7 cfcollection <cfcollection action = "action" collection = "collection_name" path = "path_to_verity_collection" language = "language" name = "queryname" categories = "yes" or "no"> cfcomponent <cfcomponent extends ="anotherComponent" output = "yes" or "no" style = "rpc" or "document" namespace = "default service namespace" serviceportname = "port element name"...
  • Page 8 HTML and CFML code </cfdocument> cfdocumentitem <cfdocument ...> Syntax 1 <cfdocumentitem type = "pagebreak"/> Syntax 2 <cfdocumentitem type = "header" or "footer"> Header/footer text </cfdocumentitem> </cfdocument> cfdocumentsection <cfdocument ...> <cfdocumentsection margintop = "number" marginbottom = "number" marginleft = "number" marginright = "number"> HTML, CFML, and cfdocumentitem tags </cfdocumentsection>...
  • Page 9 <cffile action = "copy" source = "full_path_name" destination = "full_path_name" mode = "mode" attributes = "file_attributes_list"> <cffile action = "delete" file = "full_path_name"> <cffile action = "move" source = "full_path_name" destination = "full_path_name" mode = "mode" attributes = "file_attributes_list" charset = "charset_option"> <cffile action = "read"...
  • Page 10 The following attributes are supported in HTML and XML only class = "form class" enctype = "Internet media type" id = "HTML id" onload = "load event script" onreset = "reset event script" target = "target window or frame"> </cfform> cfformgroup <cfformgroup type = "group type"...
  • Page 11 new = "file or directory name" proxyServer = "proxy server" passive = "yes" or "no"> result = "result_name" cfftp action = "listDir" <cfftp action = "listDir" </cfftp> cffunction <cffunction name = "methodName" returnType = "dataType" roles = "securityRoles" access = "methodAccess" description = "function description"...
  • Page 12 sortDescendingButton = "text"> Zero or more cfgridcolumn and cfgridrow tags </cfgrid> cfgridcolumn <cfgridcolumn name = "column_name" header = "header" width = "column_width" type = "type" display = "yes" or "no" select = "yes" or "no" font = "column_font" fontSize = "size" italic = "yes"...
  • Page 13 multipart = "yes or no" path = "path" file = "filename" name = "queryname" columns = "query_columns" firstrowasheaders = "yes" or "no" delimiter = "character" textQualifier = "character" result = "result_name" cfhttpparam tags [optional for some methods] </cfhttp> cfhttpparam <cfhttpparam type = "transaction type"...
  • Page 14 onKeyDown = "JavaScript or ActionScript" onMouseUp = "JavaScript or ActionScript" onMouseDown = "JavaScript or ActionScript" onChange = "JavaScript or ActionScript" onClick = "JavaScript or ActionScript" firstDayOfWeek = "day name" dayNames = "days-of-the-week labels" monthNames = "month labels" enabled = "Yes" or "No" visible = "Yes"...
  • Page 15 Syntax 4B <!--- This syntax invokes a web service. This syntax shows instantiation with the cfobject tag. This cfinvoke syntax applies to instantiating a web service with the cfobject tag and to instantiating a web service with the CreateObject function. ---> <cfobject webservice = "web service name"...
  • Page 16 password = "password-string" roles = "roles"> ...> </cflogin> cfloginuser <cfloginuser name = "name" password = "password-string" roles = "roles"> cflogout <cflogout> cfloop cfloop: index loop <cfloop index = "parameter_name" from = "beginning_value" to = "ending_value" step = "increment"> HTML or CFML code </cfloop>...
  • Page 17 (Optional) Mail message body and/or cfhttpparam tags </cfmail> cfmailparam <cfmail to = "recipient" subject = "msg_subject" from = "sender" ...more attributes... > <cfmailparam file = "file-name" type ="media type" contentID = "content ID" disposition = "disposition type"> <cfmailparam name = "header-name" value = "header-value"...
  • Page 18 cfobject: web service object <cfobject webservice= "http://..?wsdl" or "name set in Administrator" name = "myobjectname"> 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"...
  • Page 19 username = "username" password = "password" maxRows = "number" blockFactor = "blocksize" timeout = "seconds" cachedAfter = "date" cachedWithin = "timespan" Either of the following: debug = "yes" or "no" debug > result = "result_name" </cfquery> cfqueryparam <cfquery name = "query_name" dataSource = "ds_name"...
  • Page 20 Syntax 2 <!--- Syntax 2 - Use this syntax with Crystal Reports. ---> <cfreport report = "report_path" dataSource = "ds_name" type = "type" timeout = "number of seconds" orderBy = "result_order" username = "username" password = "password" formula = "formula"> </cfreport>...
  • Page 21 previousCriteria = "criteria" language = "language"> cfselect <cfselect name = "name" label = "label" style = "style specification" size = "integer" required = "yes" or "no" message = "text" onError = "text" multiple = "yes" or "no" query = "queryname" value = "text"...
  • Page 22 cfswitch <cfswitch expression = "expression"> One or more cfcase tags Zero or one cfdefaultcase tags </cfswitch> cftable <cftable query = "query_name" maxRows = "maxrows_table" colSpacing = "number_of_spaces" headerLines = "number_of_lines" HTMLTable border colHeaders startRow = "row_number"> </cftable> cftextarea <cftextarea name = "name" label = "text"...
  • Page 23 cftransaction <cftransaction action = "begin" or "commit" or "rollback" isolation = "read_uncommitted" or "read_committed" or "repeatable_read" > </cftransaction> cftree <cftree name = "name" format="applet", "flash", xml, or "object" required = "yes" or "no" delimiter = "delimiter" completePath = "yes" or "no" appendKey = "yes"...
  • Page 24: Cfml Functions

    CFML functions Array functions array value array array array position array position value array array array array dimension array value array minimum_size array start_pos end_pos value array sort_type , sort_order array array position1 position2 array delimiter value number list delimiters Conversion functions array delimiter...
  • Page 25: Decision Functions

    (" ") date day_of_week (" ") date (" ") date (" ") date date date_time_object date string year number date mask string date/time-string time mask date date month_number date/time-string pop-conversion date date time mask date date Decision functions absolute_path absolute_path condition string_expression1 string_expression2...
  • Page 26: Display And Formatting Functions

    value value string string string structure , " ") structure value Display and formatting functions string length (" " [, " " ]) date mask number number number radix locale inLocale string version string version string length number type date mask currency-number type...
  • Page 27: International Functions

    International functions (" ", " ") conversion-type date scope_name date_time_object locale inLocale number type date mask currency-number type string string string number mask string date/time-string currency-string string time mask scope_name charset new_locale List functions array sort_type sort_order array delimiter string number string length...
  • Page 28: Mathematical Functions

    list, value delimiters list, value delimiters string list1 list2 Mathematical functions number number array array number number number1 number2 number start length number start length number mask start length number number1 number2 number count number count number1 number2 number number number number number...
  • Page 29: Security Functions

    query column_name value row_number query.column delimiter query.column delimiter Security functions encrypted_string algorithm encoding string algorithm encoding algorithm string algorithm encoding (" ") role_name String functions ColdFusion MX supports the Java UCS-2 representation of Unicode character values 0–65535. (Earlier releases supported ASCII values.) String-processing functions process any of these characters (including ASCII 0 (NUL) characters), and continue counting subsequent characters of the string, if any.
  • Page 30: Structure Functions

    currency-string string string string start count month_number string date/time-string pop-conversion reg_expression string start returnsubexpressions reg_expression string start returnsubexpressions string start count string count string substring1 substring2 scope string substring1 substring2 scope string reg_expression substring scope string reg_expression substring scope string list1 list2 string...
  • Page 31: System Functions

    System functions absolute_path variable_name relative_path absolute_path path scope_name object path locale inLocale object mode iniFile iniPath section entry dir, prefix scope_name charset new_locale) iniPath section entry value string XML functions webservice namespace, name value mustunderstand namespace, name value mustunderstand namespace name asXML webservice...
  • Page 32: Gateway Interface

    Gateway interface Methods to implement GatewayName([String [, String configFile String getGatewayID() GatewayHelper getHelper() int getStatus() String outgoingMessage(coldfusion. eventgateway.CFEvent cfmessage) void restart() void setCFCListeners(String[] listeners) void setGatewayID(String id) void start() void stop() IM Gateway CFC incoming message methods onAddBuddyRequest(CFEvent) onAddBuddyResponse(CFEvent) onBuddyStatus(CFEvent) onIMServerMessage(CFEvent) onIncomingMessage(CFEvent) IM Gateway message sending commands...
  • Page 33: Caller Scope

    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...
  • Page 34: Form Variable

    <CFSET Request.field_name3 = "value"> Each nested tag can access the variable with the cfoutput tag, as follows: <CFOUTPUT>#Request.field_name1#</CFOUTPUT> Form variable ColdFusion supports the Form variable FieldNames. FieldNames returns the names of the fields on a form. You use it on the action page associated with a form, as follows: Form.FieldNames ColdFusion tag-specific variables Some ColdFusion tags return data as variables.
  • Page 35: Cfdirectory Variables

    CFCATCH.Column CFCATCH.KnownColumn CFCATCH.Line CFCATCH.KnownLine CFDIRECTORY variables tag, with , returns a query cfdirectory action=list object as follows, where is the name attribute queryname value: queryname.Name queryname.Size queryname.Type queryname.DateLastModified queryname.Attributes queryname.Mode CFERROR variables When generates an error page, the following error cferror variables are available if type="request"...
  • Page 36: Cfftp Error Variables

    CFFILE.ServerFileExt CFFILE.ServerFileName CFFILE.TimeCreated CFFILE.TimeLastModified CFFTP error variables When you use the attribute, these cfftp stoponerror variables are populated: CFFTP.Succeeded CFFTP.ErrorCode CFFTP.ErrorText CFFTP ReturnValue variable Some file and directory operations provide a return cfftp value, in the variable CFFTP.ReturnValue. Its value is determined by the results of the attribute.
  • Page 37: Cfquery And Cfstoredproc Variables

    .ColumnList queryname .Attachments queryname .AttachmentFiles queryname CFQUERY and CFSTOREDPROC variables tag returns information about the query in this cfquery variable: CFQUERY.ExecutionTime tag uses the query name to scope the following cfquery data about the query: queryname.CurrentRow queryname.RecordCount queryname.ColumnList tag returns the following variables: cfstoredproc CFSTOREDPROC.ExecutionTime CFSTOREDPROC.StatusCode...
  • Page 38: Client

    Client CGI.CERT_ISSUER CGI.CERT_SUBJECT CGI.CLIENT_CERT_ENCODED CGI.HTTP_ACCEPT CGI.HTTP_IF_MODIFIED_SINCE CGI.HTTP_USER_AGENT CERT_ISSUER, CERT_SUBJECT CLIENT_CERT_ENCODED variables are available only when you use client certificates. CGI environment variables When a browser makes a request to a server, the web server and the browser create environment variables. In ColdFusion MX, these variables are referred to as .

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents