Adobe 38040334 - Dreamweaver CS3 User Manual page 306

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Chapter 19: Server formats
"Data sources" on page 286, discusses how Adobe Dreamweaver CS3 inserts dynamic data into
a user's document by adding a server expression at the appropriate location. When a visitor
requests the document from the web server, that server expression is converted to a value from
a database, the contents of a request variable, or some other dynamic value. The Dreamweaver
server formats let you format how this dynamic value is presented to the visitor.
This topic discusses the API that formats the dynamic data that is returned by the functions
described in "Data sources" on page 286. The functions that are described in both topics work
together to format dynamic data. If the user selects a format for the dynamic data, Dreamweaver
calls the data source function
to get the string to insert into the
generateDynamicDataRef()
user's document (see
"generateDynamicDataRef()" on page
298). Before inserting the string into
the user's document, Dreamweaver passes that string to the
formatDynamicDataRef()
function, which is described in this topic. The string that the
formatDynamicDataRef()
function returns is the formatted dynamic data that is finally inserted in the user's document.
Dreamweaver users can format data with built-in formats, create new formats that are based on
built-in format types, or create new formats that are based on custom format types.
The user can format dynamic data in several ways. By using the Format menu in the Dynamic
Data or the Dynamic Text dialog box or in the Bindings panel, the user can format the data
before inserting it into an HTML document. If the user wants to create a format, he or she can
select the Edit Format List command from the Format menu and select a format type from the
Plus (+) menu. The Plus (+) menu contains a list of format types. Format types are basic format
categories, such as Currency, DateTime, or AlphaCase. Format types collect all the common
parameters for a category of format, letting you streamline the work to create a new format.
One example might be to create a new currency format. Essentially, all currency formatting
consists of converting a number to a string, inserting commas and decimal points, and inserting
a currency symbol, such as a dollar ($) sign. The Currency format data type collects all the
common parameters and prompts you for the required values.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents