Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/10/2013, 15:31
Jin_Zero0
 
Fecha de Ingreso: septiembre-2007
Mensajes: 27
Antigüedad: 16 años, 8 meses
Puntos: 0
Problemas al pintar DataTable

Espero me pueda alguien ayudar con esto, estoy tratando de pintar un datatable pero me arroja el error

DataTables warning (table id = 'tablaDinamicaEndosoMayor2Anos'): Requested unknown parameter '0' from the data source for row 0

Se que este error corresponde a que la cantidad de parametros que defini en primera instancia no cuadra con la que recupero, sin embargo la respuesta de los datos es correcta.

{"iTotalRecords":"425","iTotalDisplayRecords":"10" ,"aaData":[{"VIG_FIN":"29\/08\/2015","ASE_RUT":"44977729","POL_ULTENDOSO":"1","VI G_INI":"29\/08\/2013","POL_NRO":"121000385"},{"VIG_FIN":"24\/10\/2015","ASE_RUT":"41484843","POL_ULTENDOSO":"0","VI G_INI":"24\/10\/2013","POL_NRO":"121001221"},{"VIG_FIN":"03\/10\/2015","ASE_RUT":"10000002","POL_ULTENDOSO":"0","VI G_INI":"03\/10\/2013","POL_NRO":"121000799"},{"VIG_FIN":"04\/09\/2015","ASE_RUT":"10000002","POL_ULTENDOSO":"0","VI G_INI":"04\/09\/2013","POL_NRO":"121000515"},{"VIG_FIN":"03\/10\/2015","ASE_RUT":"10000148","POL_ULTENDOSO":"0","VI G_INI":"03\/10\/2013","POL_NRO":"121000683"},{"VIG_FIN":"04\/09\/2015","ASE_RUT":"10000148","POL_ULTENDOSO":"0","VI G_INI":"04\/09\/2013","POL_NRO":"121000534"},{"VIG_FIN":"03\/10\/2015","ASE_RUT":"10000028","POL_ULTENDOSO":"0","VI G_INI":"03\/10\/2013","POL_NRO":"121000644"},{"VIG_FIN":"04\/09\/2015","ASE_RUT":"10000028","POL_ULTENDOSO"....

Inicializo la tabla de la siguiente forma, con un txt vacio.

var currentSource = "/sisrea-web/source/vacio.txt";
var oTableEndosoMayor2Anos = $('#tablaDinamicaEndosoMayor2Anos').dataTable( {
"bServerSide": true,
"bProcessing": true,
"bJQueryUI" : true,
//"sPaginationType": "full_numbers",
//"iDisplayLength": 10,
"sAjaxSource": currentSource,
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": currentSource,
"data": aoData,
"success": fnCallback
});
}
});


Y la pinto con datos traidos de un java de la siguiente forma.

currentSource = '/sisrea-web/endosoReaseguroMayor2Anos.do?accion=recuperarPoliz as&fecha=' + fecha +'&ramo=' +ramo;
oTableEndosoMayor2Anos.fnDraw();


Alguien podria decirme cual podria ser el error.

Gracias