Restarting Custom Tag Processing
is usually used to terminate Custom tag processing, but it has another use too. Specify METHOD="loop" to force ColdFusion to reexecute code within a Custom Tag. (Applies to: ColdFusion 4 or later)
is usually used to terminate Custom tag processing, but it has another use too. Specify METHOD="loop" to force ColdFusion to reexecute code within a Custom Tag. (Applies to: ColdFusion 4 or later)
is used to cache programmatically generated pages that need not always be regenerated from scratch. Pages cached with automatically expire after a specified time (relative or absolute), and pages may also be expired manually using ACTION="FLUSH" when needed. When expiring pages manually you have...
returns a list of directory contents when ACTION="LIST". The returned query will contain 5 columns on a Windows machine (NAME, SIZE, TYPE, DATELASTMODIFIED, ATTRIBUTES) and six on a Unix machine (the prior 5 plus MODE). This subtle difference in behavior should be kept in mind when writing portable...
If is often necessary to pass flags (TRUE/FLASE values, often as 0 and 1) from page to page. Before using these flags you should check that they are in fact valid boolean values (just to be sure they did not get changed or tampered with). The simplest way to do this is using the IsBoolean()...
NumberFormat() is a powerful function, allowing flexible and sophisticated numeric formatting. But for quick and simple number formatting you may want to use one of the shortcut functions like DecimalFormat() which formats numbers with two decimal places and thousands separators, or DollarFormat()...
ColdFusion lists may not be the most efficient form of data storage, but they are convenient and thus very valuable. There are several ways to access lists and list members, including searching lists for values. And when searching there are two distinct forms of search supported. Use ListFind() and...
ColdFusion provides two functions named ArrayToList() and ListToArray() which can be used to convert data between lists and arrays. But, keep in mind that these functions will only support single dimensional arrays, as multi-dimensional arrays cannot be represented in list format. (Applies to:...
Need to find out how often a particular string occurs within a list? Use the ListValueCount() and ListValueCountNoCase() functions. And as these functions take an optional delimiter (the default is a comma) they can be used to find words in blocks of text too. (Applies to: ColdFusion 4 or later)
Structures are special ColdFusion data types which may contain one or more other variables (simple variables, lists, arrays, and even other structures). To obtain a list of the members within a structure use the StructKeyList() function, or use StructKeyArray() to obtain the member list as an...
Lists of strings should usually be delimited by commas with each value enclosed within quotes (in case there are spaces or other non-alpha characters within them). To convert simple lists (for example, a list returned by a FORM submission) to this format use the CFML ListQualify() function which...