This attribute defines which version of Dreamweaver server behavior processing the current server behavior targets. For Dreamweaver CS3, the version number is 9. If no version is specified, Dreamweaver assumes version 7. For this release of Dreamweaver, all groups and participants that the Server Behavior Builder creates have the version attribute set to 9.0. The group version of this attribute currently has no effect.
The serverBehavior attribute indicates which server behavior can use the group. When any of the group’s participant quickSearch strings are found in the document, the server behavior that is indicated by the serverBehavior attribute has Dreamweaver call the findServerBehaviors() function.
In some cases, if multiple groups are associated with a single server behavior, the server behavior must resolve which particular group to use.
The value is the exact name (without a path) of any server behavior HTML file within a Configuration/ServerBehaviors folder, as shown in the following example:
<group serverBehavior="redirectIfEmpty.htm">
This advanced feature supports new data sources that can be added to Dreamweaver.
Multiple versions of a server behavior can differ, depending on which data source you use. For example, the Repeat Region server behavior is designed for the standard Recordset.htm data source. If Dreamweaver is extended to support a new type of data source (such as a COM object), you can set dataSource="COM.htm" in a group file with a different implementation of Repeat Region. The Repeat Region server behavior then applies the new implementation of Repeat Region if you select the new data source.
The exact name of a data source file within a Configuration/DataSources folder, as shown in the following example:
<group serverBehavior="Repeat Region.htm" dataSource="myCOMdataSource.htm">
This group defines a new implementation of the Repeat Region server behavior to use if you use the COM data source. In the applyServerBehaviors() function, you can indicate that this group should be applied by setting the MM_dataSource property on the parameter object, as shown in the following example:
function applyServerBehavior(ssRec) { var paramObj = new Object(); paramObj.rs = getComObjectName(); paramObj.MM_dataSource = "myCOMdataSource.htm"; dwscripts.applySB(paramObj, sbObj); }
This advanced feature supports multiple implementations of a server behavior.
Multiple versions of a server behavior might differ, depending on user selection. When a server behavior is applied, but multiple group files are relevant, the correct group file can be selected by passing in a subType value. The group with that specific subType value is applied.
The value is a unique string that determines which group to apply, as shown in the following example:
<group serverBehavior="myServerBehavior.htm" subType="longVersion">
This group attribute defines the long version of the myServerBehavior subtype. You would also have a version with the subType="shortVersion" attribute. In the applyServerBehaviors() function, you can indicate which group should be applied by setting the MM_subType property on the parameter object, as shown in the following example:
function applyServerBehavior(ssRec) { var paramObj = new Object(); if (longVersionChecked) { paramObj.MM_subType = "longVersion"; } else { paramObj.MM_subType = "shortVersion"; } dwscripts.applySB(paramObj, sbObj); }
This string appears in the Server Behaviors panel for each server behavior instance that is found in the current document.
The value is a plain text string that can include argument names to make each instance unique, as shown in the following example:
<title>Redirect If Empty (@@recordsetName@@)</title>
Indicates which participant should be selected and highlighted in the document when an instance is selected in the Server Behaviors panel. The server behavior instances that are listed in this panel are ordered by the selected participant, so set the selectParticipant attribute even if the participant is not visible.
The participantName value is the exact name (without the .edml extension) of a single participant file that is listed as a group participant, as shown in the following example. For more information, see name.
<groupParticipants selectParticipant="redirectIfEmpty_link">
This attribute names a particular participant to be included in the group. The name attribute on the groupParticipant tag should be the same as the filename of the participant (without the .edml file extension).
The value is the exact name (without the .edml extension) of any participant file, as shown in the following example:
<groupParticipant name="redirectIfEmpty_init">
The identifier value is a participant that identifies the entire group. If this participant is found in the document, the group is considered to exist. This is the default value if the partType attribute is not specified.
The member value is a normal member of a group. If it is found by itself, it does not identify a group. If it is not found in a group, the group is considered incomplete.
The option value indicates that the participant is optional. If it is not found, the group is still considered complete and no incomplete flag is set in the Server Behaviors panel.
The multiple value indicates that the participant is optional and multiple copies of it can be associated with the server behavior. Any arguments that are unique to this participant are not used when grouping participants because they might have different values.
The data value is a nonstandard participant that is used by programmers as a repository for additional group data. It is ignored by everything else.