Macromedia dreamweaver 8-extending dreamweaver 사용자 설명서

다운로드
페이지 504
326
Server Behaviors
6.
In the Relative Position pop-up menu, select After the Selection.
7.
Click OK.
In the Server Behaviors panel, you can see that the Plus (+) menu contains the new server 
behavior in the pop-up list. Also, in the installation folder for your Dreamweaver files, the 
Configuration/ServerBehaviors/ASP_Js folder now contains the following three files:
The group file: Hello World.edml
The participant file: Hello World_block1.edml
A script file: Hello World.htm
How the Server Behavior API functions 
are called
The Server Behavior API functions are called in the following scenarios:
The 
findServerBehaviors()
 function is called when the document opens and again 
when the participant is edited. It searches the user’s document for instances of the server 
behavior. For each instance it finds, the 
findServerBehaviors()
 function creates a 
JavaScript object, and uses JavaScript properties to attach state information to the object.
If it is implemented, Dreamweaver calls the 
analyzeServerBehavior()
 function for 
each behavior instance that is found in the user’s document after all the 
findServerBehaviors()
 functions are called. 
When the 
findServerBehaviors()
 function creates a behavior object, it usually sets the 
four properties (
incomplete
participants
selectedNode
, and 
title
). However, it is 
sometimes easier to delay setting some of 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()
 function, wait until the recordset behavior’s 
findServerBehaviors()
 function runs because the recordset finds all instances of itself.
When the Move To Next Record behavior’s 
analyzeServerBehavior()
 function is 
called, it gets an array that contains all the server behavior objects in the document. The 
function can look through the array for its recordset object.
NO
T
E
If you are working in a multiuser configuration, these files appear in your Application 
Data folder.