Used to quickly display any datastructure in HTML table format. This is a very usefull debugging tool.
<CF_SHOW VALUE="value"
TITLECOLOR="color"
TITLEBGCOLOR="color"
ARRAYCOLOR="color"
ARRAYBGCOLOR="color"
STRUCTCOLOR="color"
STRUCTBGCOLOR="color"
QUERYCOLOR="color"
QUERYBGCOLOR="color"
FONTFACE="font"
FONTSIZE="size"
BORDER="pixles"
CELLPADDING="pixles"
CELLSPACING="pixles"
SHOWTITLE="yes/no"
MAXNESTEDLEVEL="number">
|
VALUE |
Required. The datastructure to display. CF_show will not accept just the variable name. |
|
TITLECOLOR |
Optional. Title foreground color. |
|
TITLEBGCOLOR |
Optional. Title background color. |
|
ARRAYCOLOR |
Optional. Array table foreground color. |
|
ARRAYBGCOLOR |
Optional. Array table background color. |
|
STRUCTCOLOR |
Optional. Structure table foreground color. |
|
STRUCTBGCOLOR |
Optional. Structure table background color. |
|
QUERYCOLOR |
Optional. Query table foreground color. |
|
QUERYBGCOLOR |
Optional. Query table background color. |
|
FONTFACE |
Optional. Font to use. Defaults to Arial. |
|
FONTSIZE |
Optional. Font size to use. Defaults to "2". |
|
BORDER |
Optional. Border table attribute. |
|
CELLPADDING |
Optional. Cellpadding table attribute. Defaults to 2. |
|
CELLSPACING |
Optional. Cellspacing table attribute. Defaults to 0. |
|
SHOWTITLE |
Optional. Weather or not to display the title row for the query. Default is yes. |
|
MAXNESTEDLEVEL |
Optional. The maximum number of recursions. This is set to 500 by default. |
CF_Show is very fast. It recursivelly calls CF_showStruct, CF_showQuery and CF_showArray. Each of these in turn call's CF_show.
In the following example we show a two-Dimentional Array.
<CFSET MTable = Arraynew(2)>
<CFLOOP From="1" To="10" index="x">
<CFLOOP From="1" To="10" Index="y">
<CFSET MTable[x][y] = x * y>
</CFLOOP>
</CFLOOP>
<CF_Show Value="#MTable#">
Here we have a three dimentional array nested inside of a structure.
<CFSET A = ArrayNew(3)>
<CFLOOP From="1" To="4" Index="x">
<CFLOOP From="1" To="4" INdex="y">
<CFLOOP From="1" To="4" INdex="z">
<CFSET A[x][y][z] = z * x * y>
</CFLOOP>
</CFLOOP>
</CFLOOP>
<CFSET st = StructNew()>
<CFSET st.Name = "Runar Petursson">
<CFSET st.Email = "runar@runar.net">
<CFSET st["World Wide Web Site"] = "http://tags.runar.net">
<CFSET st.Array = A>
<CF_Show Value="#ST#" ShowTitle="no">