Wednesday, January 28, 2009

at 9:28 AM Posted by Visuals India 0 comments

When creating a custom navigation bar, begin by creating its visual representation using the Dreamweaver page-design tools. You don’t have to create a link for the text string or image, Dreamweaver will create one for you.

The page you create the navigation bar for must contain a recordset to navigate. For more information, see Understanding recordsets.

A simple recordset navigation bar might look like this, with link buttons created out of images, or other content elements:

After you have added a recordset to a page, and have created a navigation bar, you must apply individual server behaviors to each navigation element. For example, a typical recordset navigation bar contains representations of the following links matched to the appropriate behavior:

Navigation link

Server behavior

Go to first page

Move to first page

Go to previous page

Move to previous page

Go to next page

Move to next page

Go to last page

Move to last page 

at 9:28 AM Posted by Visuals India 0 comments

Dreamweaver includes a set of server behaviors that let you show or hide a region based on the results returned by a recordset. For example, in a page using "Previous" and "Next" record links to navigate a results page, you can specify that the "Previous" records link be shown on all results pages except the first (which has no previous results), and that the "Next" records link be shown on all pages except the last (which has no next results).

You can also specify that a region be displayed or hidden based on whether the recordset is empty or not. If a recordset is empty (for example, no records were found matching the query), you can display a message informing the user that no records were returned. This is especially useful when creating search pages that rely on user input search terms to run queries against. Similarly, you can display an error message if there is a problem connecting to a database, or if a user’s user name and password do not match those recognized by the server.

The Show Region server behaviors are:

  • Show If Recordset Is Empty
  • Show If Recordset Is Not Empty
  • Show If First Page
  • Show If Not First Page
  • Show If Last Page
  • Show If Not Last Page

To learn how to apply the Show Region server behaviors, see Showing and hiding regions based on recordset results.

at 9:27 AM Posted by Visuals India 0 comments

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

The following example illustrates how the Repeat 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 shown above, you must create a table containing dynamic content, and apply the Repeat 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 Repeat Region server object, with a different record inserted in each new row.

To learn how to apply the Repeat Region server behavior, see Displaying multiple recordset results and Creating a table with a Repeat Region server behavior.

at 9:27 AM Posted by Visuals India 0 comments

Record counters give users a reference point when they are navigating through a set of records. Typically, record counters display the total number of records returned, and the current records being viewed. For example, if a recordset returns 40 individual records, and 8 records are displayed per page, the record counter on the first page would indicate "Displaying records 1-8 of 40."

To create a record counter for a page, you must first create a recordset for the page, an appropriate page layout to contain the dynamic content, and a recordset navigation bar. To learn more about creating these elements, and adding them to a page, see the following sections:

Once you have the above elements in the page, you can create a record counter.

Simple record counters

You can create a simple record counter using the Recordset Navigation Status server object. This server object inserts a complete record counter that you can apply text formatting to using Dreamweaver page-design tools. To learn more about this record counter, see Creating a record counter using the Recordset Navigation Status object.

Custom record counters

You can use individual record count behaviors to create custom record counters. Creating a custom record counter allows you to create a record counter beyond the simple, single row table inserted by the Recordset Navigation Status server object. You can arrange design elements in a number of creative ways, and apply an appropriate server behavior to each element.

The Record Count server behaviors are:

  • Display Starting Record Number
  • Display Ending Record Number
  • Display Total Records

Creating custom record counters leads you through the steps to create a record counter by applying the individual Record Counter server behaviors to a page’s design elements.

at 9:23 AM Posted by Visuals India 0 comments

Dreamweaver comes with several predefined data formats that you can apply to dynamic data elements. The data format styles include date and time, currency, numerical, and percentage formats.

To apply data formats to dynamic content:

  1. Select the dynamic content in either the Live Data window or its placeholder in the Document window.
  2. Select Window > Bindings to display the Bindings panel.
  3. Click the down arrow button in the Format column.

    If the down arrow is not visible, expand the panel.

  4. From the Format pop-up menu, select the data format category you want.

    Ensure that the data format is appropriate for the type of data you are formatting. For example, the Currency formats work only if the dynamic data consists of numerical data. Note that you cannot apply more than one format to the same data.

  5. Verify that the format was applied correctly by previewing the page in either the Live Data window or a browser. 

at 9:22 AM Posted by Visuals India 0 comments

You can customize the Dreamweaver existing data formats or create your own.

To customize a data format:

  1. Open a page that contains dynamic data in Design view.
  2. Select the dynamic data whose format you want to customize.
  3. Select Window > Bindings to display the Bindings panel.

    The bound data item whose dynamic text you selected will be highlighted.

  4. Click the down arrow in the Format column to expand the pop-up menu of available data formats.

    If the down arrow is not visible, expand the panel.

  5. Select Edit Format List from the pop-up menu.

    The Edit Format List dialog box appears.

  6. Complete the dialog box and click OK.

    For instructions, see Setting the Edit Format List dialog box options.

at 9:21 AM Posted by Visuals India 0 comments

You can create new data formats to suit any type of dynamic data you want to display.

To create a new data format:

  1. Open a page containing dynamic data in Design view.
  2. Select the dynamic data you want to create a custom format for.
  3. Select Window > Bindings to display the Bindings panel, and click the down arrow in the Format column.

    If the down arrow is not visible, expand the panel.

  4. Select Edit Format List from the pop-up menu.

    The Edit Format List dialog box appears.

  5. Click the Plus (+) button and select a format type.
  6. Define the format and click OK.
  7. Enter a name for the new format in the Name column.
  8. Click OK to close the Edit Format List dialog box.