MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 383

Extending dreamweaver
Table of Contents

Advertisement

When a user clicks on the Bindings Plus (+) menu, Dreamweaver searches the DataSources
folder for the current server model to gather all available data sources defined in the folder's
HTML (HTM) files. So, to make a new data source available to the user, you need to create a
data source definition file that simply provides the name of the data source using the
tag and the location of all supporting JavaScript files using the
In addition, several supporting files are necessary for implementing this data source. In
general, you might not need to use the functions in these supporting files, but they are often
useful (and necessary in this example). For example, the dwscriptsServer.js file contains the
dwscripts.stripCFOutputTags()
And, using the DataSourceClass.js file, you create an instance of the DataSource class to use as
the return value of the
To create the data source definition file:
1.
Create a new blank file.
2.
Enter the following:
<HTML>
<HEAD>
<TITLE>MyDatasource</TITLE>
<SCRIPT SRC="../../Shared/Common/Scripts/dwscripts.js"></SCRIPT>
<SCRIPT SRC="../../Shared/Common/Scripts/dwscriptsServer.js"></SCRIPT>
<SCRIPT SRC="../../Shared/Common/Scripts/DataSourceClass.js"></SCRIPT>
<SCRIPT SRC="MyDatasource.js"></SCRIPT>
</HEAD>
<body></body>
</HTML>
3.
Save the file as MyDatasource.htm in the Configuration/DataSources/ColdFusion folder.
Creating the EDML file
The EDML file defines the code that Dreamweaver inserts into the document to represent the
data source value. (For more information about EDML files, see
Behaviors," on page
321). When a user adds a particular value from a data source to a
document, Dreamweaver inserts the code that will translate into the actual value at runtime.
The participant EDML file defines the code for the document (for more information, see
"Participant EDML files" on page
For the MyDatasource Variable, you want Dreamweaver to insert the ColdFusion code
<cfoutput>#MyXML.variable#</cfoutput>
from the data source.
function used in the implementation of this data source.
findDynamicSources()
347).
SCRIPT
function.
Chapter 15, "Server
where
is the value the user wants
variable
A simple data source example
TITLE
tag.
383

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Dreamweaver 8

Table of Contents