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.
The Predefined Server BehaviorsDreamweaver 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:
RecordsetWe'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 RegionThe 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 PagingUnder 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:
Show RegionUnder 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:
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 CountUnder 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:
Dynamic TextDynamic 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 RecordThese 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 ElementsDynamic Form elements allow you to construct a user interface dynamically with data from the recordset, as well as with Bindings variables. |