In the ajaxCFC library, the CFJSON project is used to serialize data sent back from ColdFusion Components. One of the settings is the format in which the serialization should be returned: query or array. Unfortunately, Rob’s Javascript interface to the component didn’t allow you to specify this. So with the help of a colleague, the queryFormat property was added to ajaxCFC.

Here’s an example call:

$.AjaxCFC({
	url:'com/company/common/ajax/ajax.cfc',
	bean: 'Facility',
	factory:'application.beanFactory',
	method: 'getFacilities',
	queryFormat: 'array',
	data: { 'orderby':orderByField },
	useDefaultErrorHandler: false,
	success: function(results) {
		$("#facilitySelectContainer").html(results);
	},
	error: function(results) {
		Ext.MessageBox.alert('Error Notification', 'There was an error while loading the facilities. Please try again.')
	}
});

Download ajaxCFC update with queryFormat