Server-side processing

DataTables provides a server-side processing option for handling large data sets. To be able to display all filtering options at the client-side, SearchPanes requires special integration with server-side processing. Support for this has been available since SearchPanes 1.1.

Client-side

On the client-side, no special configuration for SearchPanes when used with server-side processing is required (other than to enable server-side processing with serverSide).

Server-side

Libraries

We provide SearchPanes server-side processing integration with our Editor server-side libraries. These libraries are open source and do not require an Editor license to operate. They can provide a fast way to query your database and return the information needed for both DataTables and SearchPanes. Full documentation for the platforms we support is available here:

Please note that the demo ssp.class.php file that is available for the DataTables examples does not support SearchPanes.

It is also worth noting that custom panes will not be supported by server-side processing in SearchPanes 1.1 but this is something that we are aiming to provide in the future with SearchPanes 1.2.

Implementation details

Sent parameters

When making a request to the server using server-side processing, SearchPanes will send the following data, in addition to the parameters documented in the server-side manual in order to let the server know what data is required:

Parameter name Type Description
searchPanes object This object holds a property for each field where a selection has been made. That property in turn holds a string array which is populated with the selections for that string.
searchPanes[field] object Indexed Object that holds all of the selections that have been made in that pane. This is the case when field is the name of the field where the selections have been made. The object's keys are the index of the selection and the corresponding value is a string value for that selected option.

Returned data

Once DataTables has made a request for data, with the above parameters sent to the server, it expects JSON data to be returned to it, with the following parameters for searchPanes in addition to those documented in the serverside manual:

Parameter name Type Description
searchPanes.options[field][i] array This array contains all of the data necessary for a record in a SearchPane of a given field.
searchPanes.options[field][i].label string This is the value that is to be displayed to the user in the SearchPane option.
searchPanes.options[field][i].value string This is the value that is to be used for filtering, sorting and searching in the SearchPane option.
searchPanes.options[field][i].total int This is the total number of entries in the given field of this value.
searchPanes.options[field][i].count int This is the count of entries in the given field that match the current where condition.

An example of how a return looks using these options is shown below.

"searchPanes":{
    "options":{
        "users.first_name":[
            {
               "label":"Aaron",
               "total":"1",
               "value":"Aaron",
               "count":"1"
            },
            {
               "label":"Alex",
               "total":"1",
               "value":"Alex",
               "count":0
            },
            {
               "label":"Alexa",
               "total":"1",
               "value":"Alexa",
               "count":0
            },
            ...
        ]
    }
},
...