Login

    Register

PROJECT CATEGORIES

 

cf_listPages
Project Home Known Issues Screenshots Contact Project

Author: Lars Gronholt (All RIAForge projects by this author)
Last Updated: August 13, 2008 1:36 AM
Version: 1.03
Views: 11,866
Downloads: 467
Demo URL: http://www.legalwarfare.com/index.cfm?attributes.fuseaction=viewCurrents
License: GPL (GNU General Public License)

Description:

cf_listPages is a custom tag that allows you to create a complete paginated search interface relatively quickly (works with MySQL and MS SQL Server (Apparently the MySQL version works with Oracle as well.. go figure :) )).

Releases:
v1.03 --- fixed issue with cluster variable when used on Railo servers (thanks to Gert Franz of Railo Technologies for the solution to this one). Also fixed SQL server column ordering issue on low variance columns
v1.02 --- *IMPORTANT* Security fix for SQL injection attack holes
v1.01 --- Initial release


Here is a basic example of it's use, utilising only one table -

<cf_listPages
searchName="Search Reviews"
tableMainColour="#contentbg#"
tableBorderColour="#tablebg#"
tableHeadColour="#tablebg#"
tableSecondaryColour="#highlightbg#"
datasource="#maindatasource#"
tableName="current"
primaryID="current_id"
fieldNames="current_title, current_author, current_type, current_creator_id, current_rating, current_display_date"
displayFields="current_title, current_author, current_type, current_creator_id, current_rating,df|current_display_date"
searchFields="current_title, current_author, current_rating, current_type"
columnNames="Title,Author,Type,By,Rating,Reviewed"
searchFieldKind="v,v,i,v"
orderby="current_title asc, current_author asc"
pageLink="index.cfm?attributes.fuseaction=viewCurrents"
optLink1="index.cfm?attributes.fuseaction=viewCurrents"
optLink1Name="View"
records="20">

It is possible to format the outputs eg: dates etc, using the following on the displayFields attribute -
When you call the display fields you can (as per this example, now set dollar format, date format, time format, or datetime format - this example shows date time format) - basically, in the list of display fields, if you have a column such as current_display_date that you wish to be formatted differently, add the abreviation to the front of the column name with a pipe (|) to delimit it.

displayFields="current_title, current_author, current_type, current_creator_id, current_rating,df|current_display_date"

formats are:
datetimeformat = dtf
timeformat = tf
dateformat = df
dollarformat = $

(see the linked demo URL to view and older form of this tag in action. NB: the actual review content that appears above the search is not part of the tag, also the demo URL does not have the user re-orderable columns option that this version has.)

This tag supports multiple tables, though remember to use the whereStatement attribute to join them though!

Requirements:

CF MX 6.0+ or Railo 2+
MySQL, MS SQL Server, or Oracle *untested - use the MySQL version for Oracle

Issue Tracker:

ID ISSUE STATUS UPDATED
2 SQL Server - Order by low variance columns Fixed 08/07/08 1:41 AM
3 SQL Injection issue - get updated tag Fixed 07/23/08 9:48 PM
1 attributes.whereStatement - fixed missing 'and' Fixed 03/29/07 5:59 PM

View All Issues

To enter issues for this (or any other) project, you must be logged in.