             oScroller: { loadingIndicator: true }
             ajax:
                 url: @recordQuery.url + ".json"
-                data: (d)=>@buildModels(d)
+                data: (d)=>@buildQuery(d)
                 dataSrc: (d)->
                     d.recordsFiltered = d.recordsTotal = d.total
                     row.DT_RowId = row.shift() for row in d.data

        align = switch query_field.type
            when 'integer','bigdec' then 'r'
            else 'l'
        { title: query_field.title, field: query_field.field, className: align, "targets": [ index ] }

    _dataFromModel: (model)->
        data = []
        for field,i in @columnDefinitions
            data.push( model.get(field.field) || '' )
        data

        return data.model if data.model?.isModel
        attrs = if row.attr('id') then { id: parseInt(row.attr('id')) } else {}
        for field,i in @columnDefinitions
            attrs[field.id] = data[i]
        data.model = new @modelClass(attrs,ignoreUnsaved:true)

    adjustColumnWidth: ->
