Lesson 5: Creating a Trip Detail Page

In this lesson you will enhance the Compass Travel Trip Maintenance application. This lesson contains the following exercises:

Exercise 1: Creating a Trip Detail page

Exercise 2: Avoiding the potential security risk when using dynamic SQL

Exercise 3: Linking the Trip Search Results page with the Trip Detail page

Exercise 4: Enhancing the look of the Trip Search Results and Trip Detail pages

ColdFusion tags and functions introduced in this lesson

The following table describes the ColdFusion tags and functions that you use in this lesson to enhance the sample ColdFusion application:

Element

Type

Description

DollarFormat

Function

Returns a number as a String formatted with two decimal places, a thousands separator, and a dollar sign. If the specified number is negative, parentheses are used.

DateFormat

Function

Returns a formatted date-time value. If no mask is specified, the DateFormat function returns the date value in the dd/mmm/yy format. The DateFormat function supports dates that have the U.S. date format.

IsDefined

Function

Evaluates a String value to determine whether it represents an existing variable. Returns True if the variable is found, False if not found.

URLEncodedFormat

Function

Converts a text string into a String that you can safely use in a URL.