How The Server Behavior Api Functions Are Called - Adobe 38040334 - Dreamweaver CS3 User Manual

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

Advertisement

• A script file: Hello World.htm
Note: If you are working in a multiuser configuration, these files appear in your Application Data folder.

How the server behavior API functions are called

The server behavior API functions are called in the following scenarios:
• The
findServerBehaviors()
edited. It searches the user's document for instances of the server behavior. For each instance it finds, the
findServerBehaviors()
mation to the object.
• If it is implemented, Dreamweaver calls the
is found in the user's document after all the
When the
findServerBehaviors()
(
,
incomplete
participants
the properties until all the other server behaviors find instances of themselves. For example, the Move To Next
Record behavior has two participants: a link object and a recordset object. Rather than finding the recordset object
in its
findServerBehaviors()
runs because the recordset finds all instances of itself.
When the Move To Next Record behavior's
contains all the server behavior objects in the document. The function can look through the array for its recordset
object.
Sometimes, during analysis, a single tag in the user's document is identified by two or more behaviors as being an
instance of that behavior. For example, the
might detect an instance of the Dynamic Attribute behavior that is associated with an
document. At the same time, the
at the same
tag and detect an instance of the Dynamic Textfield behavior. As a result, the Server Behaviors
input
panel shows the Dynamic Attribute block and the Dynamic Textfield. To correct this problem, the
analyzeServerBehavior()
To delete a server behavior, an
behavior to the value
true
analyzeServerBehavior()
• When the user clicks the Plus (+) button in the Server Behaviors panel, the pop-up menu appears.
To determine the content of the menu, Dreamweaver first looks for a ServerBehaviors.xml file in the same folder as
the behaviors. ServerBehaviors.xml references the HTML files that should appear in the menu.
If the referenced HTML file contains a title tag, the contents of the title tag appear in the menu. For example, if the
ServerBehaviors/ASP_Js/ GetRecords.htm file contains the tag
More Records appears in the menu.
If the file does not contain a title tag, the filename appears in the menu. For example, if GetRecords.htm does not
contain a title tag, the text GetRecords appears in the menu.
If there is no ServerBehaviors.xml file or the folder contains one or more HTML files that are not mentioned in
ServerBehaviors.xml, Dreamweaver checks each file for a title tag and uses the title tag or filename to populate the
menu.
function is called when the document opens and again when the participant is
function creates a JavaScript object, and uses JavaScript properties to attach state infor-
analyzeServerBehavior()
findServerBehaviors()
function creates a behavior object, it usually sets the four properties
,
, and
selectedNode
title
function, wait until the recordset behavior's
analyzeServerBehavior()
findServerBehaviors()
findServerBehaviors()
functions need to delete all but one of these redundant server behaviors.
analyzeServerBehavior()
. If the
property still has the value
deleted
functions, the behavior is deleted from the list.
function for each behavior instance that
functions are called.
). However, it is sometimes easier to delay setting some of
findServerBehaviors()
function is called, it gets an array that
function for the Dynamic Attribute behavior
function for the Dynamic Textfield behavior might look
function can set the
deleted
when Dreamweaver finishes calling the
true
<title>Get More Records</title>
DREAMWEAVER CS3
Extending Dreamweaver
function
tag in the user's
input
property of any server
, the text Get
247

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents