3. Recordset Paging
The Recordset Paging
server behaviors move the record pointer to the indicated data record in
a given recordset. They are frequently used in combination to navigate
through a recordset. In all, five Recordset Paging server behaviors
exist; however, you insert the following four in an identical fashion:
Move To First Record
Move To Previous Record
Move To Next Record
Move To Last Record
The fifth server behavior
in this category, Move To Specific Record, uses a different procedure,
which is covered in the following section.
Requirements: A selected page element and at least one recordset with more than one returned row.
To use any of the four basic Recordset Paging server behaviors, follow these steps:
Select the text or image to which you'd like to attach the server behavior.
From
the Server Behaviors panel, click the Add (+) button and choose the
desired behavior from the Recordset Paging submenu. The appropriate
Recordset Paging dialog box appears. Your selection is highlighted in
the Link list, as shown in Figure 3.
Make sure that the link selected is one of those showing in the Link list.
Choose the recordset you want to work with from the Recordset drop-down list.
Click OK when you're finished.
4. Move To Specific Record
The Move To Specific Record
server behavior is used after a recordset has been created to navigate
through the records. To use the Move To Specific Record server behavior
(not available in ColdFusion or PHP), follow these steps:
Select the text or image to which you'd like to attach the server behavior.
From
the Server Behaviors panel, choose Move To Specific Record from the
Recordset Paging submenu. The Move To Specific Record dialog box is
displayed, as shown in Figure 4.
Select the desired recordset from the list labeled Move To Record In.
Choose the field referenced in the URL parameter from the Where Column field.
Enter the variable in the URL parameter in the Matches URL Parameter field.
Click OK when you're finished.
5. Show Region
The Show Region
server behavior displays an area of the screen if a particular condition
is true. These are often called conditional regions. A different set of
server behaviors applies for each server model.
ColdFusion and PHP:
ASP VBScript:
Show Region If Recordset Is Empty
Show Region If Recordset Is Not Empty
Show Region If First Record
Show Region If Not First Record
Show Region If Last Record
Show Region If Not Last Record
Requirements: One or more selected page elements and at least one recordset.
Applying a Show Region server behavior is straightforward. Just follow these steps:
Select the page area you'd like to show conditionally.
From
the Server Behaviors panel, click the Add (+) button and select one of
the server behaviors from the Show Region submenu. The dialog box for
the specific Show Region server behavior you chose is displayed, like
the one shown in Figure 5. The dialog boxes for all the Show Region server behaviors are identical.
Select the recordset on which to base the Show Region condition from the Recordset list.
Click OK when you're finished.