What Is the Server Behavior Builder?

Chapter 10 - The Server Behavior Builder
byGareth Downes-Powellet al.
Wrox Press 2003

The Server Behavior Builder, also called SBB, is a tool that will let you design your own Server Behavior. It was first introduced in Dreamweaver UltraDev 4 and has been improved within Dreamweaver MX.

The Server Behavior Builder allows you to create brand-new server behaviors, and also allows you to edit existing ones.

Important 

A large amount of documentation available for the Server Behavior Builder uses the following abbreviations: SB for server behavior and SBB for Server Behavior Builder.

The Predefined Server Behaviors

Dreamweaver MX comes with a series of predefined server behaviors. In the previous chapters we've already had a look at some of them.

The Server Behavior interface can be found in the Application panel group, under the Server Behaviors tab:

click to expand

Recordset

We've already had a look at this server behavior in the previous chapters. It is one of the most important server behaviors, as it's the one that runs queries on our databases and allows us to retrieve information from them.

Repeat Region

The Repeat Region server behavior is used for repeating selected regions in your document. We saw an example of this in action at the end of Chapter 8.

Recordset Paging

Under Recordset Paging is a set of server behaviors for placing navigation elements in your document. They are mainly used in conjunction with a Repeat Region server behavior when we haven't specified to repeat all records, so we can split the results up into pages and move between them using this server behavior.

The following are the Recordset Paging server behaviors:

  • Move to first page

  • Move to last page

  • Move to previous page

  • Move to next page

Show Region

Under Show Region is a set of server behaviors that will let you hide or show some part of the document, depending on the values contained in the recordset. Note that these predefined server behaviors will only work if we have a recordset defined for the document.

The following are the Show Region server behaviors:

  • SHOW IF RECORDSET IS EMPTY

  • SHOW IF RECORDSET IS NOT EMPTY

  • SHOW IF FIRST PAGE

  • SHOW IF NOT FIRST PAGE

  • SHOW IF LAST PAGE

  • SHOW IF NOT LAST PAGE

These server behaviors can be used in conjunction with the Recordset Paging and Display Record Count behaviors to create a fully featured way for the user to navigate around the recordset.

Display Record Count

Under Display Record Count is a set of server behaviors that will allow you to give the user an indication of where they are in the recordset when used with the Recordset Paging server behavior.

The Display Record Count server behaviors are as follows:

  • Display Starting Record Number

  • Display Ending Record Number

  • Display Total Record Count

Dynamic Text

Dynamic Text is the second most useful server behavior after the Recordset behavior, but generally we don't use it from the Server Behaviors menu. The Bindings panel contains all of the dynamic elements that you can place into your document. When you place a dynamic element from the Bindings panel into your document, Dreamweaver will create a Dynamic Text server behavior that will be added into the Server Behavior panel.

Insert, Update, and Delete Record

These server behaviors allow you to modify the data in your recordset. See Chapter 6 for an in-depth explanation of these server behaviors.

Dynamic Form Elements

Dynamic Form elements allow you to construct a user interface dynamically with data from the recordset, as well as with Bindings variables.



Dreamweaver MX PHP Web Development
Dreamweaver Mx: Advanced Php Web Development
ISBN: 1904151191
EAN: 2147483647
Year: 2001
Pages: 88

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