Initialisation Error :Requested unknown parameter from the data source for row 0
Initialisation Error :Requested unknown parameter from the data source for row 0
pracede2005
Posts: 10Questions: 0Answers: 0
Hi ,
I am using datatables. I have my datatable initialisation :
[code]
$(document).ready(function() {
oTable = $('#searchList').dataTable( {
"bLengthChange": false,
"sPaginationType": "full_numbers",
"bFilter": false,
"bProcessing": true, // avtive le traitement JSON
//"bServerSide": true,
"sAjaxSource":'/OCC/json/SearchBrochures.action?'+params, // URL d'appel pour recuperer les datas json
"aoColumns": [ // definition de l'ordre et la largeur des colonnes
{ "mData": "libelleCourt","sWidth": "32%" },
{ "mData": "statut","sWidth": "21%" },
{ "mData": "auteur","sWidth": "12%" },
{ "mData": "auteurDerniereModif","sWidth": "7%" },
{ "mData": "dateCloture","sWidth": "7%" },
{ "mData": "dateCreation","sWidth": "21%" }
],
"oLanguage": {
"sProcessing": "Chargement des données en cours...",
"sLengthMenu": "Afficher _MENU_ Enregistrements",
"sZeroRecords": "Aucun élément à afficher",
"sInfo": " _END_ enregistrements sur _TOTAL_",
"sInfoEmpty": "Page 0 de 0 sur 0 entries",
"sInfoFiltered": "(filtrer sur _MAX_ total enregistrements)",
"sInfoPostFix": "",
"sSearch": "Recherche:",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Precedent",
"sNext": "Suivant",
"sLast": "Dernier"
}
}
} );
} );
[/code]
Here is the data sent par Ajax Source. I use to Json lint tool to check json syntax :
[code]
{"aaData":[["ARCELOR-2012","Nicolas Coincoin","Nicolas Coincoin","2012-08-06T00:00:00","2012-08-06T00:00:00",1],["ARCELOR-2012","Davy Henry","Davy Henry","2012-08-05T00:00:00","2012-08-05T00:00:00",2],["SNCF-2012","Sylvain Alpha","Sylvain Alpha","2012-08-07T00:00:00","2012-08-07T00:00:00",3],["SNCF-2012","Davy Henry","Davy Henry","2012-08-07T00:00:00","2012-08-07T00:00:00",5]]}
[/code]
But i am getting the following error at initialisation :
[code]DataTables warning (table id = 'searchList'): Requested unknown parameter 'libelleCourt' from the data source for row 0[/code]
What is wrong with my data ?
I am using datatables. I have my datatable initialisation :
[code]
$(document).ready(function() {
oTable = $('#searchList').dataTable( {
"bLengthChange": false,
"sPaginationType": "full_numbers",
"bFilter": false,
"bProcessing": true, // avtive le traitement JSON
//"bServerSide": true,
"sAjaxSource":'/OCC/json/SearchBrochures.action?'+params, // URL d'appel pour recuperer les datas json
"aoColumns": [ // definition de l'ordre et la largeur des colonnes
{ "mData": "libelleCourt","sWidth": "32%" },
{ "mData": "statut","sWidth": "21%" },
{ "mData": "auteur","sWidth": "12%" },
{ "mData": "auteurDerniereModif","sWidth": "7%" },
{ "mData": "dateCloture","sWidth": "7%" },
{ "mData": "dateCreation","sWidth": "21%" }
],
"oLanguage": {
"sProcessing": "Chargement des données en cours...",
"sLengthMenu": "Afficher _MENU_ Enregistrements",
"sZeroRecords": "Aucun élément à afficher",
"sInfo": " _END_ enregistrements sur _TOTAL_",
"sInfoEmpty": "Page 0 de 0 sur 0 entries",
"sInfoFiltered": "(filtrer sur _MAX_ total enregistrements)",
"sInfoPostFix": "",
"sSearch": "Recherche:",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Precedent",
"sNext": "Suivant",
"sLast": "Dernier"
}
}
} );
} );
[/code]
Here is the data sent par Ajax Source. I use to Json lint tool to check json syntax :
[code]
{"aaData":[["ARCELOR-2012","Nicolas Coincoin","Nicolas Coincoin","2012-08-06T00:00:00","2012-08-06T00:00:00",1],["ARCELOR-2012","Davy Henry","Davy Henry","2012-08-05T00:00:00","2012-08-05T00:00:00",2],["SNCF-2012","Sylvain Alpha","Sylvain Alpha","2012-08-07T00:00:00","2012-08-07T00:00:00",3],["SNCF-2012","Davy Henry","Davy Henry","2012-08-07T00:00:00","2012-08-07T00:00:00",5]]}
[/code]
But i am getting the following error at initialisation :
[code]DataTables warning (table id = 'searchList'): Requested unknown parameter 'libelleCourt' from the data source for row 0[/code]
What is wrong with my data ?
This discussion has been closed.
Replies
Allan
Allan