Inspectdynamicdataref(); A Simple Data Source Example - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

inspectDynamicDataRef()

Availability
Dreamweaver UltraDev 1.
Description
Determines the corresponding node in the data source tree from a dynamic data object. The
inspectDynamicDataRef()
string that
generateDynamicDataRef()
the
inspectDynamicDataRef()
string. The function identifies the node by using an array that contains two elements. The first
element is the name of the parent node, and the second element is the name of the child node. If
no match is found, the
Each implementation of the
own object type. For example, the recordset implementation of the
function finds a match only if the passed-in string matches a recordset node in the tree.
Arguments
string
The
argument is the dynamic data object.
string
Returns
Dreamweaver expects an array of two elements (parent name and child name) for the matched
node; it returns a

A simple data source example

This extension adds a custom data source to the Bindings panel for ColdFusion documents. Users
can specify the variable they want from the new data source.
To create a new data source:
Create a data source definition file in HTML.
1
The data source definition file tells Dreamweaver the name of the data source as it will appear
in the Bindings Plus (+) menu and also tells Dreamweaver where to find the supporting
JavaScript files for the data source implementation.
Create an EDML file that defines the code Dreamweaver will insert into the document to
2
represent the data source value (for more information about EDML files, see
on page
247).
Write the JavaScript code to implement the new data source.
3
Create any other supporting files, such as dialog boxes for user input or images to accompany
4
the data source in the Bindings panel.
This example creates a data source called MyDatasource, which includes a MyDatasource.js
JavaScript file that uses
and MyDatasource Variable command files to implement a dialog box for users to input the name
of a specific variable. The MyDatasource example is based on the implementation of the Cookie
Variable data source and the URL Variable data source. The files for both these data sources reside
in the Configuration\DataSources\ColdFusion folder.
function compares the string that Dreamweaver passes in to the
function indicates which node in the tree matches the passed-in
inspectDynamicDataRef()
inspectDynamicDataRef()
value if no matches are found.
null
"The Data Sources API" on page 295
returns for each node in the tree. If a match is found,
function returns an empty array.
function checks only for matches of its
a MyDatasource_DataRef.edml file,
A simple data source example
inspectDynamicDataRef()
"Server Behaviors"
299

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents