Adobe 38040334 - Dreamweaver CS3 User Manual page 288

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

Advertisement

Now there are two identical instances of each participant, which is allowed within the HTML. They are matched by
the order in which they occur in the document.
The following example shows a matching problem and how to avoid it. You can create a participant that computes
the tax on some dynamic data and displays the result at the selection.
<% total = Recordset1.Fields.Item("itemPrice").Value * 1.0825 %>
<html>
<body>
The total (with taxes) is $<%=total%>
</body>
</html>
The two participants are matched because they have no common parameters. However, if you add a second instance
of this server behavior, you should have the following code:
<% total = Recordset1.Fields.Item("itemPrice").Value * 1.0825 %>
<% total = Recordset1.Fields.Item("salePrice").Value * 1.0825 %>
<html>
<body>
The total0(with taxes) is $<%=total%>
Sale price (with taxes) is $<%=total%>
</body>
</html>
This server behavior no longer works correctly because only one parameter is named
make sure that there is a parameter with a unique value and can be used to match the participants. In the following
example, you could make the
<% itemPrice_total = Recordset1.Fields.Item("itemPrice").Value * 1.0825 %>
<% salePrice_total = Recordset1.Fields.Item("salePrice").Value * 1.0825 %>
<html>
<body>
The total0(with taxes) is $<%=itemPrice_total%>
Sale price (with taxes) is $<%=salePrice_total%>
</body>
</html>
The search patterns now uniquely identify and match the participants.
Search pattern resolution
Dreamweaver supports the following actions by using the participant
• File transfer dependency
• Updating the file paths for any file reference (such as those for include files)
When Dreamweaver creates server models, it builds lists of patterns by scanning all the participants for special
attributes. To find URLs to check file dependency and to fix the pathname, Dreamweaver uses each
paramNames
tag in which one of the
searchPattern
single
tag.
searchPattern
For each translator
searchPattern
weaver uses that
searchPattern
suffix string to identify include file URLs because not all URL references are translated. Also, only a single URL can
be translated as an include file.
variable name unique using the column name:
total
attribute ends with
paramNames
tag that has a
paramNames
tag to translate include file statements on the page. Dreamweaver uses a different
total
functionality:
searchPatterns
. Multiple URLs can be specified in a
_url
attribute value that ends with
DREAMWEAVER CS3
Extending Dreamweaver
. To solve this problem,
, Dream-
_includeUrl
282

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents