Dreamweaver CS4 Resources
|
Find and display the requested record on the detail page
In order to display the record requested by
the master page, you must define a recordset to hold a single record
and bind the recordset columns to the detail page.
- Switch to the detail page. If you don’t have a
detail page yet, create a blank page (File > New).
- In the Bindings panel (Window > Bindings),
click the Plus (+) button and select Recordset (Query) or DataSet
(Query) from the pop‑up menu.
The simple Recordset or DataSet dialog box appears. If
the advanced dialog box appears instead, click Simple.
- Name the recordset, and select a data source and the
database table that will provide data to your recordset.
- In the Columns area, select the table columns to include
in the recordset.
The recordset can be identical to or different from the
recordset on the master page. Usually a detail page recordset has
more columns to display more detail.
If the recordsets are
different, make sure the recordset on the detail page contains at
least one column in common with the recordset on the master page. The
common column is usually the record ID column, but it can also be
the join field of related tables.
To include only some of
the table’s columns in the recordset, click Selected and choose
the desired columns by Control‑clicking (Windows) or Command-clicking
(Macintosh) them in the list.
- Complete the Filter section as to find and display the
record specified in the URL parameter passed by the master page:
From the first pop‑up menu in the Filter
area, select the column in the recordset containing values that
match the value of the URL parameter passed by the master page.
For example, if the URL parameter contains a record ID number, select
the column containing record ID numbers. In the example discussed
in the previous section, the recordset column called CODE contains the
values that match the value of the URL parameter passed by the master page.
From the pop‑up menu beside the first menu, select
the equal sign (it should already be selected).
From the third pop‑up menu, select URL Parameter.
The master page uses a URL parameter to pass information to the
detail page.
In the fourth box, enter the name of the URL parameter
passed by the master page.
- Click OK. The recordset appears in the Bindings panel.
- Bind the recordset columns to the detail page by selecting
the columns in the Bindings panel (Window > Bindings)
and dragging them onto the page.
After uploading both the master and detail pages to the
server, you can open the master page in a browser. After clicking
a detail link on the master page, the detail page opens with more
information about the selected record.
|