findDynamicSources()
Availability
Adobe Dreamweaver UltraDev 1.
Description
This function returns the top-level nodes from the data source tree that appears in the Dynamic Data or Dynamic Text dialog box or in the Bindings panel. Each data source file has an implementation of the findDynamicSources()
function. When Adobe Dreamweaver refreshes the tree, Adobe Dreamweaver reads through all the files in the DataSources folder and calls the findDynamicSources()
function in each file.
Returns
Adobe Dreamweaver expects an array of JavaScript objects where each object can have as many as five properties, which are described in the following list:
- The
title
property is the label string that appears to the right of the icon for each parent node. Thetitle
property is always required. - The
imageFile
property is the path of a file that contains the icon (a GIF image), which represents the parent node in the tree control in the Dynamic Data or Dynamic Text dialog box or in the Bindings panel. This property is required. - The
allowDelete
property is optional. If this property is set tofalse
, when the user clicks this node in the Bindings panel, the Minus (-) button is disabled. If this property is set totrue
, the Minus (-) button is enabled. If the property is not defined, the default istrue
. - The
dataSource
property is the simple name of the file in which thefindDynamicSources()
function is defined. For example, thefindDynamicSources()
function in the Session.htm file, which is located in the Configuration/DataSources/ASP_Js folder, sets thedataSource
property to session.htm. This property is required. - The
name
property is the name of the server behavior that is associated with the data source, if one exists. Some data sources, such as recordsets, are associated with server behaviors. When you create a recordset and name itrsAuthors
, thename
attribute must equalrsAuthors
. Thename
property is always defined, but can be an empty string (""
) if no server behavior is associated with the data source (such as a session variable).NOTE
A JavaScript class that defines these properties exists in the DataSourceClass.js file, which is located in the Configuration/Shared/Common/Scripts folder.