Exercise 1: Creating a Trip Detail page
By design, the Trip Search Results page displays a subset of the information about a trip. To get
additional information about any of the trips, the user should be able to click any row to display
the detailed trip data.
In this exercise, you build a Trip Detail page to provide all the information about a particular trip
that is stored in the Compass Travel trips database. The following figure shows an example of the
Trip Detail page that you build:
After you complete the Trip Maintenance application in this tutorial, you will use this Trip Detail
page in several ways:
•
You can call the Trip Detail page directly by typing in the address of the page with an ID. For
example, to view trip information for Rio Cahabon Rafting with tripID 24, you open a
browser and enter the following URL:
http://localhost/cfdocs/getting_started/my_app/tripdetail.cfm?ID=24
•
You can navigate to the Trip Detail page by creating a hyperlink from the trip name on the Trip
Search Results page. This will offer the user drill-down capability when searching for trips. You
will link the Trip Search Results page and the Trip Detail page in one of the exercises in this
lesson.
•
You can use browse buttons on the Trip Detail page to navigate the Trips table row-by-row.
You will implement this navigational feature in
on page
97.
Building the Trip Detail page
To build the Trip Detail page, you do the following:
•
Create a CFC that queries the database.
•
Create the Trip Detail page, which invokes the CFC query and displays the results of the query.
86
Chapter 8: Lesson 5: Creating a Trip Detail Page
"Lesson 6: Creating a Main Application Page"
Need help?
Do you have a question about the COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX and is the answer not in the manual?
Questions and answers