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
function for the Dynamic Attribute behavior might detect an
findServerBehaviors()
instance of the Dynamic Attribute behavior that is associated with an
tag in the
input
user's document. At the same time, the
function for the
findServerBehaviors()
Dynamic Textfield behavior might look at the same
tag and detect an instance of
input
the Dynamic Textfield behavior. As a result, the Server Behaviors panel shows the
Dynamic Attribute block and the Dynamic Textfield. To correct this problem, the
functions need to delete all but one of these redundant server
analyzeServerBehavior()
behaviors.
To delete a server behavior, an
function can set the
analyzeServerBehavior()
deleted
property of any server behavior to the value
. If the
property still has the
true
deleted
value
when Dreamweaver finishes calling the
true
analyzeServerBehavior()
functions, the behavior is deleted from the list.
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
, the text Get More Records appears in the menu.
<title>Get More Records</title>
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.
If you do not want a file that is in the ServerBehaviors folder to appear in the menu, put
the following statement on the first line in the HTML file:
<!-- MENU-LOCATION=NONE -->
When the user selects an item from the menu, the
function
canApplyServerBehavior()
is called. If that function returns a
value, a dialog box appears. When the user clicks
true
OK, the
function is called.
applyServerBehavior()
How the Server Behavior API functions are called
327
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers