Server-side processing › Server-side › 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
},
...
]
}
},
...