Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ColdFusion Service Components for DataTables Server Side Processing.
ColdFusion
Branch: master

README

Author
	Bradley Moore
	orangexception.com
	@orangexception on Twitter

Description
	ColdFusion Server Methods for DataTables
	See http://www.datatables.net/usage/server-side for more details.

Language Support
	CF8 (withoutQueryOfQueries requires CF9+)

Usage
	Collection of request variables.
		ColdBox Implementation
			rc= Event.getCollection();
			stParameters= rc;

		Basic Implementation
			stParameters= url;
			structAppend( stParameters , form );

	DataTableSerivce Instantiation
		oDataTableService= createObject( "component" , "path.to.DataTableService" );

	Returns an object, which lets your controller determine how to use data.
		qExample= oModel.getQuery();
		oDataTableResult= oDataTableService.toObject( stParameters , qExample );

		if( request.bAJAX )
			sJSON= oDataTableResult.toJSON();

		else
			qExample= oDataTableResult.toQuery();

	Returns JSON string ready for consumption by DataTables.
		qExample= oModel.getQuery();
		sJSON= oDataTableService.toJSON( stParameters , qExample );

	Returns a query, which is useful for exporting results.
		qExample= oModel.getQuery();
		qExample= oDataTableService.toQuery( stParameters , qExample );

History
	2013.2.12
		Added components that rely on datasource to paginate. These should be used if your expected resultset is > 100 records.

	2011.1.19
		Fixed variable names in usage section
		Fixed Issue -> Original Query Meta Data versus Query of Query Meta Data
		Fixed Issue -> Data formatting is only applied to JSON

	2011.1.18
		Fixed Issue -> Invalid Column Names

	2011.1.17
		Foundation
Something went wrong with that request. Please try again.