Creating The Main Application Page From The Trip Detail Page; Adding Navigation Buttons To Browse Database - MACROMEDIA COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

Creating the main application page from the Trip Detail page

To this point in the tutorial, you created a very useful drill-down query facility. Compass Travel
trip coordinators can produce lists required by management and easily locate and display
information about any trip. There are several requirements that were identified in
Preparing to Build the Sample
browse through the Trips table, and the ability to add, delete, and edit trip information.
The trip coordinator must be viewing the details of a specific trip to edit trip information or
delete a trip. The Trip Detail page provides this trip-specific detail information. Therefore, you
will use the Trip Detail page as the main Trip Maintenance application page.
You will modify the Trip Detail page so that it can act as a main switchboard to accomplish this
additional functionality. The Trip Detail page shows information about a single trip. You will
convert the Trip Detail page into the main application page by adding the following
functionality:
Navigation buttons to browse the database
Database maintenance buttons to edit, delete, or add new trips
An additional button to launch the search facility

Adding navigation buttons to browse database

The drill-down search function developed in the last exercise is very useful when the user knows
some search criteria to enter. Unfortunately, however, flipping back and forth between the results
page and the detail page to navigate through a record set can be tedious. Moreover, on occasion
the trip coordinator might want to browse the Trips database just to check for anomalies or to
become familiar with its contents. In these cases, the user does not know the criteria to search for
in advance.
For example, an anomaly may exist on any trip record, the trip coordinator would have no idea
what search criteria to specify on the search form to find these problem records. To solve this
problem, the browse function gives the coordinator the ability to navigate sequentially through
the trips table using the single record trips display. The following figure shows the navigation
buttons. The label under each button describes which row to display relative to the currently
displayed row:
Exercise: adding navigation buttons to the Trip Detail page
In this exercise, you use the HTML
Trips Detail page.
To add navigation:
Open the tripdetail.cfm in the my_app directory in your editor.
1
To implement the trip navigation buttons, insert the following code between the
2
</cfoutput>
<form action="navigationaction.cfm" method="post">
<input type="hidden" name="RecordID" value="#tripID#">
Application, however, that you have not addressed: the ability to
form
tags in the tripdetail.cfm file:
and
tags to add the navigational buttons to the
input
Enhancing the Trip Maintenance application
Lesson 1:
and
</table>
89

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?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents