beautypg.com

Create a dynamic table, Display multiple recordset results – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 627

background image

To the top

To the top

Display multiple recordset results

The Repeating Region server behavior lets you display multiple records from a recordset within a page. Any dynamic data selection can be turned
into a repeating region. However, the most common regions are a table, a table row, or a series of table rows.

1. In Design view, select a region that contains dynamic content.

The selection can be anything, including a table, a table row, or even a paragraph of text.

To select a region on the page precisely, you can use the tag selector on the left corner of the document window. For example, if the region
is a table row, click inside the row on the page, then click the rightmost tag in the tag selector to select the table row.

2. Select Window > Server Behaviors to display the Server Behaviors panel.

3. Click the Plus (+) button, and select Repeating Region.

4. Select the name of the recordset to use from the pop-up menu.

5. Select the number of records to display per page, and click OK.

In the Document window, a thin, tabbed, gray outline appears around the repeating region.

Modify repeating regions in the Property inspector

Modify the selected repeating region by changing any of the following options:

The name of the repeating region.

The recordset providing the records for the repeating region.

The number of records displayed

When you select a new option, Dreamweaver updates the page.

Reuse PHP recordsets

For a tutorial on reusing PHP recordsets, see David Powers’s tutorial,

How Do I Reuse a PHP Recordset in More Than One Repeat Region?

Create a dynamic table

The following example illustrates how the Repeating Region server behavior is applied to a table row, and specifies that nine records are displayed
per page. The row itself displays four different records: city, state, street address, and ZIP code.

To create a table such as the one in the previous example, you must create a table that contains dynamic content, and apply the Repeating
Region server behavior to the table row containing the dynamic content. When the page is processed by the application server, the row is
repeated the number of times specified in the Repeating Region server object, with a different record inserted in each new row.

1. Do one of the following to insert a dynamic table:

Select Insert > Data Objects > Dynamic Data > Dynamic Table to display the Dynamic Table dialog box.

From the Data category of the Insert panel, click the Dynamic Data button and select the Dynamic Table icon from the pop-up menu.

620

This manual is related to the following products: