Ben Forta

Blog

February 5, 2002

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)

February 4, 2002

Expiring Cached Pages

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...

February 3, 2002

Lists

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...

February 2, 2002

Check Flags Before Using Them

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()...

February 1, 2002

Simplified Number Formatting

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()...

January 31, 2002

Finding List Members

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...

January 30, 2002

Converting Between Lists And Arrays

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:...

January 29, 2002

Number Of Instances In A List

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)

January 28, 2002

Determining Structure Members

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...

January 27, 2002

Lists Of Strings

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...

Page 439 of 489 (4890 posts)