MACROMEDIA COLDFUSION 4.5- TO CFML Quick Reference

Summary of COLDFUSION 4.5- TO CFML

  • Page 1

    Allaire corporation quick reference to cfml © 1999 allaire corporation. All rights reserved. This manual, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this manual is furnished for infor...

  • Page 2

    Quick reference to cfml iii contents cfml tags ............................................................. 1 cfml functions .................................................. 12 array functions .....................................................................12 date and time functions ...........

  • Page 3

    Iv quick reference to cfml standard cgi variables ......................................25 request ................................................................................... 25 server ...................................................................................... 25 client .............

  • Page 4

    Quick reference to cfml 1 cfml tags cfabort cfapplet name="form_variable_name" height="pixels" width="pixels" vspace="pixels" hspace="pixels" align="alignment" notsupported="text" param_1="value" param_2="value" param_n="value"> cfapplication clientmanagement="yes" or "no" clientstorage="storage typ...

  • Page 5

    2 quick reference to cfml cfdirectory directory="directory name" name="query name" filter="list filter" mode="permission" sort="sort specification" newdirectory="new directory name"> cferror type="request" or "validation" or "monitor" or "exception" template="template_path" mailto="email_address" ex...

  • Page 6

    Quick reference to cfml 3 port="port" connection="name" proxyserver="proxyserver" proxybypass="proxybypass" retrycount="number" stoponerror="yes" or "no" passive="yes" or "no"> or action="action" username="name" password="password" name="query_name" server="server" asciiextensionlist="extensions" tr...

  • Page 7

    4 quick reference to cfml font="column_font" fontsize="size" italic="yes" or "no" bold="yes" or "no" href="url" hrefkey="column_name" target="url_target" select="yes" or "no" display="yes" or "no" type="type" headerfont"font_name" headerfontsize="size" headeritalic="yes" or "no" headerbold="yes" or ...

  • Page 8

    Quick reference to cfml 5 cfimpersonate securitycontext="securitycontext" username="name" password="password" type= "cf" or "os"> ... Html or cfml code to execute ... Securitycontext="securitycontext" username="name" password="password" type= "cf" or "os"> ... Html or cfml code to execute ... Cfincl...

  • Page 9

    6 quick reference to cfml cflocation cflock timeout="timeout in seconds " scope="application" or "server" or "session" name="lockname" throwontimeout="yes" or "no" type= "readonly" or "exclusive "> timeout="timeout in seconds " scope="application" or "server" or "session" name="lockname" throwontime...

  • Page 10

    Quick reference to cfml 7 cfobject action="action" class="program_id" name="text" context="context" server="server_name"> or context="context" class="file or naming service" name="text" locale="type-value arguments"> or type="java" action="create" class="java class" name="object name"> cfoutput quer...

  • Page 11

    8 quick reference to cfml cfquery datasource="ds_name" dbtype="type" dbserver="dbms" dbname="database name" username="username" password="password" maxrows="number" blockfactor="blocksize" timeout="milliseconds" cachedafter="date" cachedwithin="timespan" provider="comprovider" providerdsn="datasourc...

  • Page 12

    Quick reference to cfml 9 cfsearch collection="collection_name" type="criteria" criteria="search_expression" maxrows="number" startrow="row_number" external="yes" or "no" language="language"> cfselect required="yes" or "no" message="text" onerror="text" size="integer" multiple="yes" or "no" query="q...

  • Page 13

    10 quick reference to cfml groovecolor="color" bgcolor="color" textcolor="color" font="font_name" fontsize="integer" italic="yes" or "no" bold="yes" or "no" notsupported="text"> cfstoredproc datasource="ds_name" username="username" password="password" dbserver="dbms" dbname="database name" blockfact...

  • Page 14

    Quick reference to cfml 11 cftree required="yes" or "no" delimiter="delimiter" completepath="yes" or "no" appendkey="yes" or "no" highlighthref="yes" or "no" onvalidate="script_name" message="text" onerror="text" font="font" fontsize="size" italic="yes" or "no" bold="yes" or "no" height="integer" wi...

  • Page 15

    12 quick reference to cfml 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 ) a...

  • Page 16

    Quick reference to cfml 13 decision functions isarray(value [, number ]) isauthenticated([ security-context-name ]) isauthorized( resourcetype , resourcename [, action ]) isbinary( value ) isboolean( value ) isdate( string ) isdebugmode() isdefined(" variable_name ") isleapyear( year ) isnumeric( st...

  • Page 17

    14 quick reference to cfml list functions arraytolist( array [, delimiter ]) listappend(list, value [, delimiters ]) listchangedelims( list , new_delimiter [, delimiters ]) listcontains( list , substring [, delimiters ]) listcontainsnocase( list , substring [, delimiters ]) listdeleteat( list , posi...

  • Page 18

    Quick reference to cfml 15 decrementvalue( number ) exp( number ) fix( number ) incrementvalue( number ) inputbasen( string , radix ) int( number ) log( number ) log10( number ) max( number1 , number2 ) min( number1 , number2 ) pi() rand() randomize( number ) randrange( number1 , number2 ) round( nu...

  • Page 19

    16 quick reference to cfml parsedatetime( string1 [, string2 ] ) refind( reg_expression , string [, start ] [, returnsubexpressions ] ) refindnocase( reg_expression , string [, start ] [, returnsubexpressions ] ) removechars( string , start , count ) repeatstring( string , count ) replace( string , ...

  • Page 20

    Quick reference to cfml 17 other functions authenticateduser() authenticatedcontext() createobject("com", class or progid , "inproc or local or remote ", , servername ) createobject("corba", filename or naming_context_name , ior or naming_service , int_orb_args , ) createobject("java", classname ) c...

  • Page 21

    18 quick reference to cfml coldfusion variables coldfusion returns a wide variety of variables, such as those returned in a cfdirectory or cfftp operation. Variables are usually referenced by "scoping" the variable according to its type, as in session.Varname, or application.Varname. Variable scope ...

  • Page 22

    Quick reference to cfml 19 custom tag variables any coldfusion custom tag returns the following variables: thistag.Executionmode thistag.Hasendtag thistag.Generatedcontent thistag.Assocattribs[index] a custom tag can also set a caller variable to provide infor- mation to the caller. The caller varia...

  • Page 23

    20 quick reference to cfml coldfusion tag-specific variables a number of coldfusion tags return data as variables. For example, the cffile tag returns file size information in the filesize variable, referenced as cffile.Filesize. The following tags return data that can be referenced in vari- ables: ...

  • Page 24

    Quick reference to cfml 21 cfdirectory variables when used with action=list, cfdirectory returns a query object. Queryname is the value of the name attribute used in the cfdirectory operation. Queryname.Name queryname.Size queryname.Type queryname.Datelastmodified queryname.Attributes queryname.Mode...

  • Page 25

    22 quick reference to cfml cffile action=upload variables file variables are read-only. Use the cffile. Prefix to refer- ence file variables: cffile.Clientdirectory. Note that although still supported, the file. Prefix is deprecated in favor of the cffile. Prefix. Cffile.Attemptedserverfile cffile.C...

  • Page 26

    Quick reference to cfml 23 cfftp query object columns when you use cfftp with the listdir action, cfftp returns a query object. Queryname is the value of the name attribute used in the cfftp operation. Row is the row number for each file/directory entry returned by the listdir operation. A sepa- rat...

  • Page 27

    24 quick reference to cfml cfquery and cfstoredproc variables in addition to returning data from a coldfusion data source, the cfquery tag also returns information about the query: cfquery.Executiontime cfquery also uses the name of the query to scope data about the query: queryname.Currentrow query...

  • Page 28

    Quick reference to cfml 25 standard cgi variables this is a list of cgi 1.1 variables many web servers create when a cgi script is called. Note: the cgi variables that are available for your use vary with the web server and configuration. Some of the follow- ing variables may not be available to you...

  • Page 29

    26 quick reference to cfml coldfusion studio keyboard shortcuts studio offers a full set of keyboard commands for its tools and functions. The listing below generally matches the order of the menu commands, with related shortcuts added. You can change shortcut key combinations and add new ones by op...

  • Page 30

    Quick reference to cfml 27 goto next start tag ctrl + ] (right bracket) goto previous start tag ctrl + [ (left bracket) delete line ctrl + y delete string ctrl + del delete previous string ctrl + backspace search > find ctrl + f search > replace ctrl + r search > find next f3 search > extended find ...

  • Page 31

    28 quick reference to cfml tags > insert br tag and new line ctrl + enter tags > insert align center code shift + ctrl + c tags > insert comment tag shift + ctrl + m tags > open img dialog shift + ctrl + i tags > insert italic tag ctrl + i tags > insert non-breaking space shift + ctrl + spacebar tag...

  • Page 32

    Quick reference to cfml 29 debugger keyboard shortcuts show tag tip for current tag (esc to close) f2 show tag insight for current tag (esc to close) shift + f2 debugger shortcuts command key start/continue ctrl + f5 start - no debugging ctrl + alt + f5 end alt + f5 restart ctrl + shift + f5 step in...

  • Page 33

    30 quick reference to cfml.