Specifications

Chapter 15192
3 Dreamweaver goes through each file in the appropriate server model folder, calling
findDynamicSources() in each file. For each value in the returned array, Dreamweaver calls
the
generateDynamicSourceBindings() function in the same file to get a fresh list of all the
fields in each data source for the users document. Those fields are presented to the user as a
tree control in the Dynamic Data or Dynamic Text dialog box or 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
4
If the user double-clicks on a data source name in the Bindings panel to edit the data source,
Dreamweaver calls
editDynamicSource() to handle user edits within the tree.
5 If the user clicks the minus (-) button, Dreamweaver gets the current node selection from the
tree and passes it to
deleteDynamicSource(), which deletes the code that was added earlier
with
addDynamicSource(). If it does not make sense to delete the current selection, the
function returns an error message. After
deleteDynamicSource() returns, Dreamweaver
refreshes the data source tree by calling
findDynamicSources() and
generateDynamicSourceBindings().
6 If the user chooses a data source and clicks OK in the Dynamic Data or Dynamic Text dialog
box, or clicks Insert or Bind in the Bindings panel, Dreamweaver calls
generateDynamicDataRef(). The return value is inserted in the document at the current
insertion point.
7 If the user displays the Dynamic Data or 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 Configuration/DataSources/ASP_Js folder), calling the
implementation of
inspectDynamicDataRef() in each file.
Dreamweaver calls the inspectDynamicDataRef() function to convert the dynamic data
object back from the code in the users document to an item in the tree. (This process is the
reverse of what occurs when
generateDynamicDataRef() is called.) If
inspectDynamicDataRef() returns an array that contains two elements, Dreamweaver
provides a visual cue, showing which item in the tree is bound to the current selection.
8 Every time the user changes the selection, Dreamweaver calls the inspectDynamicDataRef()
function to determine whether the new selection is dynamic text or a tag with a dynamic
attribute. If it is dynamic, Dreamweaver displays the bindings for the current selection in the
Bindings panel.
9 Using the Bindings panel or the Dynamic Data or Dynamic Text dialog box, its possible to
change the data format for a dynamic text object or a dynamic attribute that the user has
already added to the page. When the format is changed, Dreamweaver calls
generateDynamicDataRef() to get the string to insert into the users document and passes
that string to
formatDynamicDataRef() (described in Server Formats on page 199). The
string that returns from
formatDynamicDataRef() is inserted in the users document.