Summary; In The Next Lesson - MACROMEDIA COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

To handle the Search and Delete buttons from the Trip Detail page, enter the following code:
3
<!---
SEARCH BUTTON--->
<cfif IsDefined("Form.btnSearch")>
<cflocation url="tripsearch.cfm">
<!---
DELETE BUTTON --->
<cfelseif IsDefined("Form.btnDelete")>
<cfquery name="DeleteRecord" dataSource="CompassTravel">
DELETE FROM trips WHERE tripID = #Form.RecordID#
</cfquery>
<cflocation url="tripdetail.cfm">
</cfif>
Save the page as maintenanceaction.cfm in the my_app directory.
4
View the tripdetail.cfm page in a browser.
5
The current trip is Nepal. Notice that the destination for Nepal Summit Challenge trip is Imji
Himal, Nepal.
Click Search.
6
The Trip Search page appears.
In the Trip Search page, select Begins With in the selection box for Trip Location. Then enter
7
Imji in the trip location value field.
Click Search. Verify that only a single trip is found whose location begins with Imji.
8
To return to the Trip Detail page for this trip, click the hyperlink.
9
In the Trip Detail page, click Delete to remove this record from the Trip database file.
10
Verify that the trip record was removed from the Trips database by repeating the search in step
11
7.

Summary

In this lesson, you converted the Trip Detail page from the search result display into a trip
browser by using
through the Trips table. You also limited the result set of the dynamic query using the
attribute of the
cfquery
By implementing the Maintenance Action page, you enabled users to take action on the current
trip. You used the ColdFusion
Additionally, you used

In the next lesson

You have implemented two of the four maintenance buttons on the Trip Detail page. In the next
lesson, you will implement the Add and Edit buttons. The user input must be validated against
the Compass Travel business rules before the data is saved to the database. Therefore, in the next
lesson, you also will implement the business rule validation. In the final lesson, you will add the
database update logic.
116
Chapter 9: Lesson 5: Implementing the Browsing and Maintenance Database Functions
with SQL SELECT. The browser enables users to navigate sequentially
cfquery
tag.
cflocation
and SQL DELETE to delete the current trip.
cfquery
tag to link the search page to the Trip Detail page.
MaxRows

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION MX and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents