Creating the master page (ColdFusion)

Creating the master page (ColdFusion)

This section describes how to create a master page that lists database records. You can use a dynamic table to list the records on a ColdFusion page.

Before you start, make sure you define a ColdFusion data source for your database. For more information, see Database Connections for ColdFusion Developers.

To create a master page:

  1. In Dreamweaver, create a new ColdFusion page.

    Select File > New > Dynamic, select ColdFusion, and click Create. A blank ColdFusion page opens in Dreamweaver.

  2. Define a recordset for the page.

    In the Bindings panel, click the Plus (+) button, select Recordset (Query), and complete the Recordset dialog box. For more information, click the Help button in the dialog box. If you want to write your own SQL statement, click the Advanced button to open the advanced Recordset dialog box.

    Make sure the recordset contains all the table columns you need to create your dynamic table. The recordset must also include the table column containing the unique key of each record--that is, the record ID column. In the following example, the CODE column contains information that uniquely identifies each record.

    This is a picture of the feature being described.

    Typically, the recordset on the master page extracts a few columns from a database table while the recordset on the detail page extracts more columns from the same table to provide the extra detail.

    The recordset can be defined by the user at runtime. For more information, see Building search/results pages (ColdFusion, ASP, JSP, PHP).

  3. Insert a dynamic table to display the records on the page.

    Place the insertion point where you want the dynamic table to appear on the page, then selection Insert > Application Objects > Dynamic Data > Dynamic Table.

    The Dynamic Table dialog box appears.

    This is a picture of the feature being described.

  4. Complete the Dynamic Table dialog box and click OK.

    Dreamweaver inserts a dynamic table on the page.

    If you need help completing the dialog box, click the Help button in the dialog box.

  5. If you want, delete the dynamic table column containing the record IDs.

    If you don’t want to show record IDs to users, you can delete the column from the dynamic table. Click anywhere on the page to move the focus to the page. Move the cursor near the top of the column in the dynamic table until the column cells are outlined in red, and then click to select the column. Press Delete to delete the column from the table.

The next step is to create the links to the detail page. See Creating the links to the detail page (ColdFusion).



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Reference
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly