Adobe 38040334 - Dreamweaver CS3 User Manual page 293

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

Advertisement

The following steps describe the process that is involved in adding dynamic data:
When the user clicks the Plus (+) menu in the Bindings panel, a pop-up menu appears.
1
To determine the contents of the menu, Dreamweaver first looks for a DataSources.xml file in the same folder as the
data sources (for example, Configuration/DataSources/ASP_Js/DataSources.xml). The DataSources.xml file
describes the contents of the pop-up menu; it contains references to the HTML files that should be placed in the pop-
up menu.
Dreamweaver checks each referenced HTML file for a title tag. If the file contains a title tag, the content of the title
tag appears in the menu. If the file does not contain a title tag, the filename is used in the menu.
After Dreamweaver finishes reading the DataSources.xml file or if the file does not exist, Dreamweaver searches the
rest of the folder to find other items that should appear in the menu. If Dreamweaver finds files in the main folder
that aren't in the menu, it adds them to the menu. If subfolders contain files that aren't in the menu, Dreamweaver
creates a submenu and adds those files to the submenu.
When the user selects an item from the Plus (+) menu, Dreamweaver calls the
2
so that code for the data source is added to the user's document.
3
Dreamweaver goes through each file in the appropriate server model folder, calling the
function in each file. For each value in the returned array, Dreamweaver calls the
generateDynamicSourceBindings()
for the user's document. Those fields are presented to the user as a tree control in the Dynamic Data or the Dynamic
Text dialog box or in the Bindings panel. The data source tree for an ASP document might appear as shown in the
following example:
Recordset (Recordset1)
ColumnOneInRecordset
ColumnTwoInRecordset
Recordset (Recordset2)
ColumnOfRecordset
Request
NameOfRequestVariable
NameOfAnotherRequestVariable
Session
NameOfSessionVariable
If the user double-clicks on a data source name in the Bindings panel to edit the data source, Dreamweaver calls
4
the
editDynamicSource()
5
If the user clicks the Minus (-) button, Dreamweaver gets the current node selection from the tree and passes it to
the
deleteDynamicSource()
function. If it cannot delete the current selection, the function returns an error message.
addDynamicSource()
After the
deleteDynamicSource()
and the
findDynamicSources()
6
If the user selects a data source and clicks OK in the Dynamic Data or the Dynamic Text dialog box, or clicks
Insert or Bind in the Bindings panel, Dreamweaver calls the
value is inserted in the document at the current insertion point.
7
If the user displays the Dynamic Data or the Dynamic Text dialog box to edit an existing dynamic data object, the
selection in the data source tree needs to be initialized to the dynamic data object. To initialize the tree control,
Dreamweaver goes through each file in the appropriate server model folder (for example, the Configu-
ration/DataSources/ASP_Js folder), calling the implementation of the
file.
function in the same file to get a new list of all the fields in each data source
function to handle the user edits within the tree.
function, which deletes the code that was added earlier with the
function returns, Dreamweaver refreshes the data source tree by calling the
generateDynamicSourceBindings()
addDynamicSource()
functions.
generateDynamicDataRef()
inspectDynamicDataRef()
DREAMWEAVER CS3
Extending Dreamweaver
function,
findDynamicSources()
function. The return
function in each
287

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents