Sort Repeat Region: Buy now for $25.00 US

*Now Dreamweaver MX and DW MX 2004 Compatible!

Check tom-muck.com for other DW MX 2004 extensions

As with our other server behaviors, the Sort Repeat Region server behavior is designed to work hand-in-hand with existing UltraDev server behaviors, like the Recordset and the Repeat Region. This server behavior will enhance the core set of UltraDev or Dreamweaver MX server behaviors by adding a Sort function to arsenal. The server behavior assumes you are using standard UltraDev or Dreamweaver MX recordsets and repeat regions.

When you apply a repeat region to a table row, there is no easy way to sort the results according to the column heading. This server behavior can be applied to a table that has a repeat region on it. The server behavior will automatically create all the code necessary to have clickable links in place of the column headings that will order the recordset by that column. Another click will order in descending order.

The pre-requisites to use this extension are as follows:

  • Add a recordset to the page (UD4 or Dreamweaver MX compatible recordset)
  • Add a two-row table on the page that has the headings in the first row and the dynamic data in the second row.
  • Add a repeat region to the second row.

With that in place, you can use the Sort Repeat Region server behavior. The steps to apply the server behavior are as follows:

1. Select your dynamic table on the page. The entire table should be selected. This can be done by clicking the <table> tag in the tag selector.

2. Open the server behavior panel and choose (in the UltraDev 4 version)

Server Behaviors >> Basic-UltraDev >> Sort Repeat Region

or

Server Behaviors >> DWTeam >> Sort Repeat Region

in the Dreamweaver MX version.

The interface looks like this:


3. If there are any parameters (such as a search text field) enter them by name in the Keep These Parameters box. If there are none, leave it blank (the default). If you have more than one parameter, enter the parameters separated by commas, like this*:

txtSearchfield,txtDate,chkYesNo

*Note: PHP users have a checkbox option for "new method". This causes the server behavior to use $_GET and $_POST in the code instead of $HTTP_GET_VARS and $HTTP_POST_VARS. This works in PHP version 4.1.2. Version 1.0.3 of the Sort Repeat Region extension also fixes a problem with parameters when globals are turned off on the server. Parameters should still be listed in the field as the above Step 3 shows.

4. Choose the recordset and the default sort column. The recordset will be sorted based on the default column the first time the page is hit and if there are no clicks. You can also choose to have it sort in ascending or descending order by default.

5. The column names should reflect what is already in your table, but you can change the text of the heading links here if necessary.

6. Click OK and the server behavior will be applied, including the appropriate order-by clause in your SQL statement.

The behavior is available for ASP, JSP, PHP/MySQL, and ColdFusion. The extension works well with our Recordset Navigation Suite and our Dynamic Search SQL extensions for ASP, CF, and PHP.

The server behavior can be applied once per page.

NOTE: If you are using the Simple recordset, the recordset will not be editable in the Simple recordset dialog box any more -- always edit your recordset from the Advanced dialog box to avoid any problems.

NOTE: The server behavior works by using dynamic SQL. Therefore, it won't work with a stored procedure. It works well with standard recordsets created using tables or views.

The main extension page for Basic-Ultradev (http://www.basic-ultradev.com/extensions) uses the Sort Repeat Region extension. Since there are numerous search parameters on that page, I entered them as a list in the Parameters box, like this:

asp,jsp,cf,ud1,ud4,dw,jsp,php,searchfield

Each item is an actual form field on that page. That way, I was able to keep any relevant search info available to each click of a table heading.

For a live demo, click here.

The Sort Repeat Region server behavior extension is available for $25 US. Payments are accepted thru Paypal or Kagi's secure online transaction system. When you order, it is important to use a REAL email address, as you will be notified by email with a registration number that you can use to download the product. Email addresses from free accounts such as Yahoo or Hotmail will be closely scrutinized for validity before sending the confirmation, and may delay the processing. We hold your email addresses in the utmost security and would never spam or share your address with others.

Note: There are versions of the extension that work in UltraDev 4 AND Dreamweaver MX. When you make the purchase, you can download one or the other or both. The Dreamweaver MX version is a FREE upgrade for existing customers. No guarantees are made or implied for future versions of Dreamweaver.

 



Sort Repeat Region is only $25.00

   If you are having trouble paying through Paypal, please try Kagi as an alternative method of payment. You'll receive a unique ID to enable your download by email.

 

 

The extension author Tom Muck was nominated by Macromedia in 2000 in the Best Extension Developer category.