MACROMEDIA COLDFUSION MX 61-CFML Reference page 164

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Attribute
values
valuesDisplay
valuesDelimiter
Using expressions in textColor and bgColor attributes
The
textColor
A color value literal
A hex value
An expression that selects a text color based on the evaluation of a Boolean expression
The syntax for an expression is as follows:
(CX operator string ? true_condition : false_condition)
The symbol meanings are as follows:
: the column that contains the value to test. For the current column, use
CX
column to evaluate, use
: One of these operators:
operator
: Value to compare against. A literal, such as
string
numeric:
(C2 LT 0 ? red : black)
true_condition
false_condition
If the string in the expression can be interpreted as a number, the comparisons in the expression
are interpreted as numeric. Otherwise, the comparison is a string comparison.
This code shows an expression that displays the grid element in blue if the grid element contains
the string "Pam"; or black, otherwise:
<cfgridcolumn name = "FirstName" textColor = "(CX EQ Pam ? blue : black)">
This example displays the text in red if the value in column 1 is greater than four; or black,
otherwise:
<cfgridcolumn name = "FirstName" textColor = "(C1 GT 4 ? blue : black)">
164
Chapter 2: ColdFusion Tags
Req/Opt
Default
Optional
Optional
Optional
, [comma]
and
attributes accept the following kinds of values:
bgColor
n; for example,
C
EQ
: Value for
textColor
: Value for
textColor
Description
Formats cells in column as drop-down list boxes;
specify items in drop-down list. Example:
values = "arthur, scott, charles, 1-20, mabel"
Maps elements in values attribute to string to display
in drop-down list. Delimited strings and/or numeric
range(s).
Delimiter in
values
C2
(equal),
(greater than),
GT
(C2 EQ Johnson ? blue : green);
if condition evaluates to
if condition evaluates to
and
attributes.
valuesDisplay
; if n is the
CX
(less than)
LT
"true"
"false"
or

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents