Last Record: If users are on the last set of records, you can alert them to this fact. Show Region if Not Last Record: As the user cycles through the records, you can provide a message. When they are on the last set of records, a message can be displayed. NOTE In ColdFusion, the conditional behaviors are named a bit differently. For example, ColdFusion uses Show Region if First Page, Show Region if Not First Page, Show Region if Last Page, and Show Region if Not Last Page. To add a Show Region behavior to your page, follow these steps: 1. Type the text No more items to view just below the Previous and Next paging widgets. This is the "region" that shows when the condition (the current record is the last record in the recordset) is true. 2. With the text highlighted, select the server behavior Show Region If Last Record from the Show Region submenu. The Show Region If Last Record dialog appears. 3. Make sure that the rsEmployeeStore recordset is selected and click OK. Notice that a gray visual aid surrounds the text. This guarantees that the text contained within this region appears only when the user reaches the last record in the recordset. Save your work and run it in the browser by pressing the F12 key. Click the Next hyperlink until you reach the last record. A message will appear when you reach the end of the recordset. Again, this is only one example of the server behaviors exposed in the Show Region set of server behaviors. Now that you have a general idea about what the Show Region server behaviors do, feel free to experiment with the others. Using Repeat Region Although recordset paging is the ideal model to strive for, at times you might want to display all the records (or a certain number of records) in the database at once. The Repeat Region behavior enables you to create a pattern that repeats within the web page. For instance, in the EmployeeStore page, a table was created to display the content for the image, name, description, and cost. Using the Repeat Region server behavior, you can maintain that structure and repeat the contents for every record (or a certain number of records) in the database. To create a repeatable region on our page, follow these steps: 1. Select the table for which you want the content to repeat. Your selection should resemble Figure 25.37. Figure 25.37. Select the table for which you want to create the repeatable region. [View full size image] 2. Select the Repeat Region option by clicking the Add (+) button in the Server Behaviors panel. The Repeat Region dialog appears, similar to Figure 25.38. Figure 25.38. Configure the Repeat Region dialog to show 5 records at a time from the rsEmployeeStore recordset. 3. The Repeat Region dialog enables you to enter choices regarding which recordset to create the repeat region for as well as how you want to display the results. Make sure that the rsEmployeeStore option is selected from within the Recordset menu. Additionally, make sure that the 5 Records at a Time option is selected. Click OK to apply the server behavior to the selected table. Save your work and test the results in the browser by pressing the F12 key. Figure 25.39 shows records grouped in sets of 5. Figure 25.39. All the records are shown when you use the Repeat Region server behavior.