Group EDML file tags

 < Day Day Up > 

These tags and attributes are valid within the EDML group files.

<group>

Description

This tag contains all the specifications for a group of participants.

Parent

None.

Type

Block tag.

Required

Yes.

<group> attributes

The following items are valid attributes of the group tag.

version

Description

This attribute defines which version of Dreamweaver server behavior processing the current server behavior targets. For Dreamweaver 8, the version number is 7. 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 7.0. The group version of this attribute currently has no effect.

Parent

 group 

Type

Attribute.

Required

No.

serverBehavior

Description

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.

Parent

 group 

Type

Attribute.

Required

No.

Value

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"> 

dataSource

Description

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.

Parent

 group 

Type

Attribute.

Required

No.

Value

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); } 

subType

Description

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.

Parent

 group 

Type

Attribute.

Required

No.

Value

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); } 

<title>

Description

This string appears in the Server Behaviors panel for each server behavior instance that is found in the current document.

Parent

 group 

Type

Block tag.

Required

No.

Value

The value is a plain text string that can include parameter names to make each instance unique, as shown in the following example:

 <title>Redirect If Empty (@@recordsetName@@)</title> 

<groupParticipants>

Description

This tag contains an array of groupParticipant declarations.

Parent

 group 

Type

Block tag.

Required

Yes.

<groupParticipants> attributes

The following items are valid attributes of the groupParticipants tag.

selectParticipant

Description

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.

Parent

 groupParticipants 

Type

Attribute.

Required

No.

Value

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. See "name" on page 345.

 <groupParticipants selectParticipant="redirectIfEmpty_link"> 

<groupParticipant>

Description

This tag represents the inclusion of a single participant in the group.

Parent

 groupParticipants 

Type

Tag.

Required

Yes (at least one).

<groupParticipant> attributes

The following items are valid attributes of the groupParticipant tag.

name

Description

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).

Parent

 groupParticipant 

Type

Attribute.

Required

Yes.

Value

The value is the exact name (without the .edml extension) of any participant file, as shown in the following example:

 <groupParticipant name="redirectIfEmpty_init"> 

This example refers to the redirectIfEmpty_init.edml file.

partType

Description

This attribute indicates the type of participant.

Parent

 groupParticipant 

Type

Attribute.

Required

No.

Values

 identifier, member, option, multiple, data 

  • 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 whether other group participants are found. 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 parameters 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.

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net